Ineffassign fixes for pkg/proxy

This commit is contained in:
Alena Prokharchyk 2020-01-30 14:34:33 -08:00
parent a06d16565c
commit 43ce2eb1ff
2 changed files with 6 additions and 0 deletions

View File

@ -75,6 +75,9 @@ func (hns hnsV1) getEndpointByIpAddress(ip string, networkName string) (*endpoin
}
endpoints, err := hcsshim.HNSListEndpointRequest()
if err != nil {
return nil, fmt.Errorf("Failed to list endpoints: %v", err)
}
for _, endpoint := range endpoints {
equal := false
if endpoint.IPAddress != nil {

View File

@ -83,6 +83,9 @@ func (hns hnsV2) getEndpointByIpAddress(ip string, networkName string) (*endpoin
}
endpoints, err := hcn.ListEndpoints()
if err != nil {
return nil, fmt.Errorf("Failed to list endpoints: %v", err)
}
for _, endpoint := range endpoints {
equal := false
if endpoint.IpConfigurations != nil && len(endpoint.IpConfigurations) > 0 {