Skip to content

Commit 4b7c607

Browse files
authored
Merge pull request kubernetes#77464 from danielqsj/vs
replace errors.New(fmt.Sprintf()) with fmt.Errorf()
2 parents 19b83c3 + ed9a3fa commit 4b7c607

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)