Skip to content

Commit ed9a3fa

Browse files
committed
replace errors.New(fmt.Sprintf()) with fmt.Errorf()
1 parent c516bb5 commit ed9a3fa

File tree

1 file changed

+1
-1
lines changed
  • staging/src/k8s.io/legacy-cloud-providers/vsphere

1 file changed

+1
-1
lines changed

staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ func (vs *VSphere) getVSphereInstanceForServer(vcServer string, ctx context.Cont
609609
vsphereIns, ok := vs.vsphereInstanceMap[vcServer]
610610
if !ok {
611611
klog.Errorf("cannot find vcServer %q in cache. VC not found!!!", vcServer)
612-
return nil, errors.New(fmt.Sprintf("Cannot find node %q in vsphere configuration map", vcServer))
612+
return nil, fmt.Errorf("cannot find node %q in vsphere configuration map", vcServer)
613613
}
614614
// Ensure client is logged in and session is valid
615615
err := vs.nodeManager.vcConnect(ctx, vsphereIns)

0 commit comments

Comments
 (0)