Skip to content

Commit e53118d

Browse files
authored
Merge pull request kubernetes#76945 from SataQiu/fix-golint-volume-2019042302
Fix golint failures of pkg/volume/portworx
2 parents 6cd8529 + a37adce commit e53118d

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

hack/.golint_failures

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,6 @@ pkg/volume/host_path
344344
pkg/volume/iscsi
345345
pkg/volume/nfs
346346
pkg/volume/photon_pd
347-
pkg/volume/portworx
348347
pkg/volume/rbd
349348
pkg/volume/scaleio
350349
pkg/volume/storageos

pkg/volume/portworx/portworx.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const (
3737
attachHostKey = "host"
3838
)
3939

40-
// This is the primary entrypoint for volume plugins.
40+
// ProbeVolumePlugins is the primary entrypoint for volume plugins.
4141
func ProbeVolumePlugins() []volume.VolumePlugin {
4242
return []volume.VolumePlugin{&portworxVolumePlugin{nil, nil}}
4343
}

pkg/volume/portworx/portworx_util.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,11 @@ func createDriverClient(hostname string, port int32) (*osdclient.Client, error)
263263
return nil, err
264264
}
265265

266-
if isValid, err := isClientValid(client); isValid {
266+
isValid, err := isClientValid(client)
267+
if isValid {
267268
return client, nil
268-
} else {
269-
return nil, err
270269
}
270+
return nil, err
271271
}
272272

273273
// 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) {
365365
}
366366

367367
if svc == nil {
368-
err = fmt.Errorf("Service: %v not found. Consult Portworx docs to deploy it.", pxServiceName)
368+
err = fmt.Errorf("Service: %v not found. Consult Portworx docs to deploy it", pxServiceName)
369369
klog.Errorf(err.Error())
370370
return nil, err
371371
}

0 commit comments

Comments
 (0)