Merge pull request #77464 from danielqsj/vs

replace errors.New(fmt.Sprintf()) with fmt.Errorf()
k3s-v1.15.3
Kubernetes Prow Robot 2019-05-06 11:09:56 -07:00 committed by GitHub
commit 4b7c607ba4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -609,7 +609,7 @@ func (vs *VSphere) getVSphereInstanceForServer(vcServer string, ctx context.Cont
vsphereIns, ok := vs.vsphereInstanceMap[vcServer] vsphereIns, ok := vs.vsphereInstanceMap[vcServer]
if !ok { if !ok {
klog.Errorf("cannot find vcServer %q in cache. VC not found!!!", vcServer) klog.Errorf("cannot find vcServer %q in cache. VC not found!!!", vcServer)
return nil, errors.New(fmt.Sprintf("Cannot find node %q in vsphere configuration map", vcServer)) return nil, fmt.Errorf("cannot find node %q in vsphere configuration map", vcServer)
} }
// Ensure client is logged in and session is valid // Ensure client is logged in and session is valid
err := vs.nodeManager.vcConnect(ctx, vsphereIns) err := vs.nodeManager.vcConnect(ctx, vsphereIns)