Merge pull request #76945 from SataQiu/fix-golint-volume-2019042302

Fix golint failures of pkg/volume/portworx
This commit is contained in:
Kubernetes Prow Robot 2019-04-24 14:20:58 -07:00 committed by GitHub
commit e53118df1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 6 deletions

View File

@ -344,7 +344,6 @@ pkg/volume/host_path
pkg/volume/iscsi
pkg/volume/nfs
pkg/volume/photon_pd
pkg/volume/portworx
pkg/volume/rbd
pkg/volume/scaleio
pkg/volume/storageos

View File

@ -37,7 +37,7 @@ const (
attachHostKey = "host"
)
// This is the primary entrypoint for volume plugins.
// ProbeVolumePlugins is the primary entrypoint for volume plugins.
func ProbeVolumePlugins() []volume.VolumePlugin {
return []volume.VolumePlugin{&portworxVolumePlugin{nil, nil}}
}

View File

@ -263,11 +263,11 @@ func createDriverClient(hostname string, port int32) (*osdclient.Client, error)
return nil, err
}
if isValid, err := isClientValid(client); isValid {
isValid, err := isClientValid(client)
if isValid {
return client, nil
} else {
return nil, err
}
return nil, err
}
// getPortworxDriver returns a Portworx volume driver which can be used for cluster wide operations.
@ -365,7 +365,7 @@ func getPortworxService(host volume.VolumeHost) (*v1.Service, error) {
}
if svc == nil {
err = fmt.Errorf("Service: %v not found. Consult Portworx docs to deploy it.", pxServiceName)
err = fmt.Errorf("Service: %v not found. Consult Portworx docs to deploy it", pxServiceName)
klog.Errorf(err.Error())
return nil, err
}