mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Merge pull request #87710 from alena1108/jan30proxy
Ineffassign fixes for pkg/proxy
This commit is contained in:
commit
5caeec8023
@ -75,6 +75,9 @@ func (hns hnsV1) getEndpointByIpAddress(ip string, networkName string) (*endpoin
|
|||||||
}
|
}
|
||||||
|
|
||||||
endpoints, err := hcsshim.HNSListEndpointRequest()
|
endpoints, err := hcsshim.HNSListEndpointRequest()
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("Failed to list endpoints: %v", err)
|
||||||
|
}
|
||||||
for _, endpoint := range endpoints {
|
for _, endpoint := range endpoints {
|
||||||
equal := false
|
equal := false
|
||||||
if endpoint.IPAddress != nil {
|
if endpoint.IPAddress != nil {
|
||||||
|
@ -83,6 +83,9 @@ func (hns hnsV2) getEndpointByIpAddress(ip string, networkName string) (*endpoin
|
|||||||
}
|
}
|
||||||
|
|
||||||
endpoints, err := hcn.ListEndpoints()
|
endpoints, err := hcn.ListEndpoints()
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("Failed to list endpoints: %v", err)
|
||||||
|
}
|
||||||
for _, endpoint := range endpoints {
|
for _, endpoint := range endpoints {
|
||||||
equal := false
|
equal := false
|
||||||
if endpoint.IpConfigurations != nil && len(endpoint.IpConfigurations) > 0 {
|
if endpoint.IpConfigurations != nil && len(endpoint.IpConfigurations) > 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user