code: func pingLeases(leases []subnet.SubnetLease) error {
  	const workers = 5
  	const timeout = 1 * time.Second
  
  	if len(leases) == 0 {
  		return nil
  	}
  
  	work := make(chan subnet.SubnetLease)
  	results := make(chan bool, workers)
  	client := http.Client{Timeout: timeout}
  
  	var wg sync.WaitGroup
  	wg.Add(workers)
  	for i := 0; i < workers; i++ {
  		go func() {
  			for l := range work {
  				res, err := client.Get(fmt.Sprintf("http://%s:%s/ping", l.Network.IP, l.Attrs.HTTPPort))
  				if err == nil {
  					res.Body.Close()
  				}
  				results <- err == nil && res.StatusCode == 200
  			}
  			wg.Done()
  		}()
  	}
  
  	go func() {
  		wg.Wait()
  		close(results)
  	}()
  
  	for _, l := range leases {
  		select {
  		case work <- l:
  		case success := <-results:
  			if success {
  				close(work)
  				return nil
  			}
  		}
  	}
  	close(work)
  
  	for success := range results {
  		if success {
  			return nil
  		}
  	}
  
  	return errors.New("failed to successfully ping a neighbor")
  }
docs: // ping neighbor leases five at a time, timeout 1 second, returning as soon as
  // one returns success.