mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-23 02:47:57 +00:00
cleanup: fix errors in wrapped format and log capitalization in proxy
Signed-off-by: wangyx1992 <wang.yixiang@zte.com.cn>
This commit is contained in:
@@ -81,7 +81,7 @@ 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)
|
||||
return nil, fmt.Errorf("failed to list endpoints: %w", err)
|
||||
}
|
||||
for _, endpoint := range endpoints {
|
||||
equal := false
|
||||
@@ -137,7 +137,7 @@ func (hns hnsV1) createEndpoint(ep *endpointsInfo, networkName string) (*endpoin
|
||||
} else {
|
||||
createdEndpoint, err = hnsNetwork.CreateEndpoint(hnsEndpoint)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Local endpoint creation failed: %v", err)
|
||||
return nil, fmt.Errorf("local endpoint creation failed: %w", err)
|
||||
}
|
||||
}
|
||||
return &endpointsInfo{
|
||||
|
@@ -48,7 +48,7 @@ func (hns hnsV2) getNetworkByName(name string) (*hnsNetworkInfo, error) {
|
||||
policySettings := hcn.RemoteSubnetRoutePolicySetting{}
|
||||
err = json.Unmarshal(policy.Settings, &policySettings)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Failed to unmarshal Remote Subnet policy settings")
|
||||
return nil, fmt.Errorf("failed to unmarshal Remote Subnet policy settings")
|
||||
}
|
||||
rs := &remoteSubnetInfo{
|
||||
destinationPrefix: policySettings.DestinationPrefix,
|
||||
@@ -89,7 +89,7 @@ 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)
|
||||
return nil, fmt.Errorf("failed to list endpoints: %w", err)
|
||||
}
|
||||
for _, endpoint := range endpoints {
|
||||
equal := false
|
||||
|
@@ -576,7 +576,7 @@ func NewProxier(
|
||||
time.Sleep(10 * time.Second)
|
||||
hnsNetworkInfo, err = hns.getNetworkByName(hnsNetworkName)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Could not find HNS network %s", hnsNetworkName)
|
||||
return nil, fmt.Errorf("could not find HNS network %s", hnsNetworkName)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -617,7 +617,7 @@ func NewProxier(
|
||||
}
|
||||
}
|
||||
if len(hostMac) == 0 {
|
||||
return nil, fmt.Errorf("Could not find host mac address for %s", nodeIP)
|
||||
return nil, fmt.Errorf("could not find host mac address for %s", nodeIP)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user