refact(pkg): Removes unused import, variables and functions. (#321)

Signed-off-by: Rahul Grover <rahulgrover99@gmail.com>
This commit is contained in:
Rahul Grover 2021-05-04 19:57:41 +05:30 committed by GitHub
parent 0e6a02ea74
commit a8376796b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 10 additions and 36 deletions

View file

@ -28,7 +28,6 @@ import (
"github.com/openebs/zfs-localpv/pkg/builder/snapbuilder"
"github.com/openebs/zfs-localpv/pkg/builder/volbuilder"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/klog"
)
@ -225,7 +224,7 @@ func DeleteVolume(volumeID string) (err error) {
// GetVolList fetches the current Published Volume list
func GetVolList(volumeID string) (*apis.ZFSVolumeList, error) {
listOptions := v1.ListOptions{
listOptions := metav1.ListOptions{
LabelSelector: ZFSNodeKey + "=" + NodeID,
}

View file

@ -457,8 +457,7 @@ func CreateClone(vol *apis.ZFSVolume) error {
}
if err := getVolume(volume); err != nil {
var args []string
args = buildCloneCreateArgs(vol)
args := buildCloneCreateArgs(vol)
cmd := exec.Command(ZFSVolCmd, args...)
out, err := cmd.CombinedOutput()
@ -749,7 +748,7 @@ func ResizeZFSVolume(vol *apis.ZFSVolume, mountpath string, resizefs bool) error
return err
}
if resizefs == true {
if resizefs {
// resize the filesystem so that applications can use the expanded space
err = handleVolResize(vol, mountpath)
}