diff --git a/hack/.golint_failures b/hack/.golint_failures index 8ab29fc3b7a..38f6a4d404c 100644 --- a/hack/.golint_failures +++ b/hack/.golint_failures @@ -349,7 +349,6 @@ pkg/volume/csi/fake pkg/volume/git_repo pkg/volume/host_path pkg/volume/iscsi -pkg/volume/local pkg/volume/nfs pkg/volume/photon_pd pkg/volume/portworx diff --git a/pkg/volume/local/local.go b/pkg/volume/local/local.go index 72915cc2f47..05c52f6ba17 100644 --- a/pkg/volume/local/local.go +++ b/pkg/volume/local/local.go @@ -42,7 +42,7 @@ const ( defaultFSType = "ext4" ) -// This is the primary entrypoint for volume plugins. +// ProbeVolumePlugins is the primary entrypoint for volume plugins. func ProbeVolumePlugins() []volume.VolumePlugin { return []volume.VolumePlugin{&localVolumePlugin{}} } @@ -587,15 +587,15 @@ func (u *localVolumeUnmapper) TearDownDevice(mapPath, _ string) error { // GetGlobalMapPath returns global map path and error. // path: plugins/kubernetes.io/kubernetes.io/local-volume/volumeDevices/{volumeName} -func (lv *localVolume) GetGlobalMapPath(spec *volume.Spec) (string, error) { - return filepath.Join(lv.plugin.host.GetVolumeDevicePluginDir(utilstrings.EscapeQualifiedName(localVolumePluginName)), - lv.volName), nil +func (l *localVolume) GetGlobalMapPath(spec *volume.Spec) (string, error) { + return filepath.Join(l.plugin.host.GetVolumeDevicePluginDir(utilstrings.EscapeQualifiedName(localVolumePluginName)), + l.volName), nil } // GetPodDeviceMapPath returns pod device map path and volume name. // path: pods/{podUid}/volumeDevices/kubernetes.io~local-volume // volName: local-pv-ff0d6d4 -func (lv *localVolume) GetPodDeviceMapPath() (string, string) { - return lv.plugin.host.GetPodVolumeDeviceDir(lv.podUID, - utilstrings.EscapeQualifiedName(localVolumePluginName)), lv.volName +func (l *localVolume) GetPodDeviceMapPath() (string, string) { + return l.plugin.host.GetPodVolumeDeviceDir(l.podUID, + utilstrings.EscapeQualifiedName(localVolumePluginName)), l.volName }