From 4ead52e0f5a181b436dda1df79e39a946cb184cf Mon Sep 17 00:00:00 2001 From: jianglingxia Date: Sat, 3 Nov 2018 12:56:10 +0800 Subject: [PATCH] fix local volume getVolumeSourceFSType func by golint --- pkg/volume/local/local.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/volume/local/local.go b/pkg/volume/local/local.go index 3b0b59f563e..30a5d32c703 100644 --- a/pkg/volume/local/local.go +++ b/pkg/volume/local/local.go @@ -322,10 +322,9 @@ func getVolumeSourceFSType(spec *volume.Spec) (string, error) { spec.PersistentVolume.Spec.Local != nil { if spec.PersistentVolume.Spec.Local.FSType != nil { return *spec.PersistentVolume.Spec.Local.FSType, nil - } else { - // if the FSType is not set in local PV spec, setting it to default ("ext4") - return defaultFSType, nil } + // if the FSType is not set in local PV spec, setting it to default ("ext4") + return defaultFSType, nil } return "", fmt.Errorf("spec does not reference a Local volume type")