mirror of https://github.com/k3s-io/k3s
fix golint failures of pkg/volume/portworx
parent
4ec29a1a2b
commit
a37adceadf
|
@ -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
|
||||
|
|
|
@ -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