From 72f34b817ea6761c1700679b50c4e45919d8a187 Mon Sep 17 00:00:00 2001 From: yuxiaobo Date: Mon, 20 Jan 2020 16:47:54 +0800 Subject: [PATCH] staticcheck: pkg/volume/fc, pkg/volume/portworx and pkg/volume/vsphere_volume Signed-off-by: yuxiaobo --- hack/.staticcheck_failures | 3 --- pkg/volume/fc/fc.go | 1 - pkg/volume/portworx/portworx.go | 3 +-- pkg/volume/vsphere_volume/vsphere_volume.go | 8 +------- 4 files changed, 2 insertions(+), 13 deletions(-) diff --git a/hack/.staticcheck_failures b/hack/.staticcheck_failures index 38248f165cf..a3217eaed9e 100644 --- a/hack/.staticcheck_failures +++ b/hack/.staticcheck_failures @@ -26,12 +26,10 @@ pkg/volume/awsebs pkg/volume/azure_dd pkg/volume/azure_file pkg/volume/csi -pkg/volume/fc pkg/volume/flexvolume pkg/volume/flocker pkg/volume/iscsi pkg/volume/local -pkg/volume/portworx pkg/volume/quobyte pkg/volume/rbd pkg/volume/scaleio @@ -41,7 +39,6 @@ pkg/volume/util/fsquota pkg/volume/util/fsquota/common pkg/volume/util/operationexecutor pkg/volume/util/subpath -pkg/volume/vsphere_volume test/e2e/apps test/e2e/autoscaling test/e2e/instrumentation/logging/stackdriver diff --git a/pkg/volume/fc/fc.go b/pkg/volume/fc/fc.go index dfc2aa9d062..c820605df26 100644 --- a/pkg/volume/fc/fc.go +++ b/pkg/volume/fc/fc.go @@ -312,7 +312,6 @@ func (plugin *fcPlugin) ConstructBlockVolumeSpec(podUID types.UID, volumeName, m type fcDisk struct { volName string podUID types.UID - portal string wwns []string lun string wwids []string diff --git a/pkg/volume/portworx/portworx.go b/pkg/volume/portworx/portworx.go index da6cfbe7088..8c0b6299096 100644 --- a/pkg/volume/portworx/portworx.go +++ b/pkg/volume/portworx/portworx.go @@ -383,8 +383,7 @@ func (d *portworxVolumeDeleter) Delete() error { type portworxVolumeProvisioner struct { *portworxVolume - options volume.VolumeOptions - namespace string + options volume.VolumeOptions } var _ volume.Provisioner = &portworxVolumeProvisioner{} diff --git a/pkg/volume/vsphere_volume/vsphere_volume.go b/pkg/volume/vsphere_volume/vsphere_volume.go index 2d023da3b1f..406be3a08d1 100644 --- a/pkg/volume/vsphere_volume/vsphere_volume.go +++ b/pkg/volume/vsphere_volume/vsphere_volume.go @@ -182,17 +182,11 @@ type vsphereVolume struct { podUID types.UID // Unique identifier of the volume, used to find the disk resource in the provider. volPath string - // Filesystem type, optional. - fsType string - //diskID for detach disk - diskID string // Utility interface that provides API calls to the provider to attach/detach disks. manager vdManager // Mounter interface that provides system calls to mount the global path to the pod local path. mounter mount.Interface - // diskMounter provides the interface that is used to mount the actual block device. - diskMounter mount.Interface - plugin *vsphereVolumePlugin + plugin *vsphereVolumePlugin volume.MetricsProvider }