Skip to content

Commit

Permalink
rename var for clarity
Browse files Browse the repository at this point in the history
Signed-off-by: Yuri Shkuro <github@ysh.us>
  • Loading branch information
yurishkuro committed Jan 14, 2021
1 parent 00dde71 commit 5ddf595
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/discovery/grpcresolver/grpc_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ func (r *Resolver) rendezvousHash(addresses []string) []string {
}
sort.Sort(hosts)
size := min(r.discoveryMinPeers, len(hosts))
addressesPerHost := make([]string, size)
topAddrs := make([]string, size)
for i := 0; i < size; i++ {
addressesPerHost[i] = hosts[i].address
topAddrs[i] = hosts[i].address
}
return addressesPerHost
return topAddrs
}

func min(a, b int) int {
Expand Down

0 comments on commit 5ddf595

Please sign in to comment.