fix golint failures of pkg/volume/portworx

k3s-v1.15.3
SataQiu 2019-04-23 23:26:41 +08:00
parent 4ec29a1a2b
commit a37adceadf
3 changed files with 5 additions and 6 deletions

View File

@ -348,7 +348,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
}