feat: add zero prealloc (#1847)

pull/1849/head
Sasha Melentyev 3 years ago committed by GitHub
parent 997b6a9f79
commit da147b5763
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      contrib/registry/consul/client.go

@ -51,7 +51,7 @@ func defaultResolver(_ context.Context, entries []*api.ServiceEntry) []*registry
version = ss[1]
}
}
var endpoints []string //nolint:prealloc
endpoints := make([]string, 0)
for scheme, addr := range entry.Service.TaggedAddresses {
if scheme == "lan_ipv4" || scheme == "wan_ipv4" || scheme == "lan_ipv6" || scheme == "wan_ipv6" {
continue

Loading…
Cancel
Save