Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix golint failures of pkg/volume/local #76860

Merged
merged 1 commit into from
Apr 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion hack/.golint_failures
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions pkg/volume/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}}
}
Expand Down Expand Up @@ -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
}