code: func randomEndpoint(endpointsToHeight map[string]*endpointInfo) string {
  	var candidates []string
  	for endpoint := range endpointsToHeight {
  		candidates = append(candidates, endpoint)
  	}
  
  	rand.Seed(time.Now().UnixNano())
  	return candidates[rand.Intn(len(candidates))]
  }
docs: // randomEndpoint returns a random endpoint of the given endpointInfo