mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 01:06:27 +00:00
fix golint failures of pkg/volume/portworx
This commit is contained in:
parent
4ec29a1a2b
commit
a37adceadf
@ -348,7 +348,6 @@ pkg/volume/host_path
|
|||||||
pkg/volume/iscsi
|
pkg/volume/iscsi
|
||||||
pkg/volume/nfs
|
pkg/volume/nfs
|
||||||
pkg/volume/photon_pd
|
pkg/volume/photon_pd
|
||||||
pkg/volume/portworx
|
|
||||||
pkg/volume/rbd
|
pkg/volume/rbd
|
||||||
pkg/volume/scaleio
|
pkg/volume/scaleio
|
||||||
pkg/volume/storageos
|
pkg/volume/storageos
|
||||||
|
@ -37,7 +37,7 @@ const (
|
|||||||
attachHostKey = "host"
|
attachHostKey = "host"
|
||||||
)
|
)
|
||||||
|
|
||||||
// This is the primary entrypoint for volume plugins.
|
// ProbeVolumePlugins is the primary entrypoint for volume plugins.
|
||||||
func ProbeVolumePlugins() []volume.VolumePlugin {
|
func ProbeVolumePlugins() []volume.VolumePlugin {
|
||||||
return []volume.VolumePlugin{&portworxVolumePlugin{nil, nil}}
|
return []volume.VolumePlugin{&portworxVolumePlugin{nil, nil}}
|
||||||
}
|
}
|
||||||
|
@ -263,11 +263,11 @@ func createDriverClient(hostname string, port int32) (*osdclient.Client, error)
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if isValid, err := isClientValid(client); isValid {
|
isValid, err := isClientValid(client)
|
||||||
|
if isValid {
|
||||||
return client, nil
|
return client, nil
|
||||||
} else {
|
|
||||||
return nil, err
|
|
||||||
}
|
}
|
||||||
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// getPortworxDriver returns a Portworx volume driver which can be used for cluster wide operations.
|
// 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 {
|
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())
|
klog.Errorf(err.Error())
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user