mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #76945 from SataQiu/fix-golint-volume-2019042302
Fix golint failures of pkg/volume/portworx
This commit is contained in:
commit
e53118df1b
@ -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
|
||||
|
@ -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}}
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user