From 80de428f49182188417dd4a4655e67c8bd603138 Mon Sep 17 00:00:00 2001 From: "chendt.fnst" Date: Tue, 20 Nov 2018 17:43:58 +0800 Subject: [PATCH] Fix golint verify errors. **What type of PR is this?** /kind cleanup **What this PR does / why we need it**: $ hack/verify-golint.sh Errors from golint: pkg/cloudprovider/providers/aws/aws_fakes.go:357:9: if block ends with a return statement, so drop this else and outdent its block pkg/volume/util/util.go:204:9: if block ends with a return statement, so drop this else and outdent its block **Which issue(s) this PR fixes** *(optional, in fixes #(, fixes #, ...) format, will close the issue(s) when PR gets merged)*: **Special notes for your reviewer**: **Release note**: ``` NONE ``` --- pkg/cloudprovider/providers/aws/aws_fakes.go | 4 ++-- pkg/volume/util/util.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/cloudprovider/providers/aws/aws_fakes.go b/pkg/cloudprovider/providers/aws/aws_fakes.go index 28946fa35c..844a3a0c0a 100644 --- a/pkg/cloudprovider/providers/aws/aws_fakes.go +++ b/pkg/cloudprovider/providers/aws/aws_fakes.go @@ -353,10 +353,10 @@ func (m *FakeMetadata) GetMetadata(key string) (string, error) { } } - return "", nil - } else { return "", nil } + + return "", nil } // FakeELB is a fake ELB client used for testing diff --git a/pkg/volume/util/util.go b/pkg/volume/util/util.go index 070961c282..8f5f4f6ff6 100644 --- a/pkg/volume/util/util.go +++ b/pkg/volume/util/util.go @@ -201,9 +201,9 @@ func PathExists(path string) (bool, error) { return false, nil } else if IsCorruptedMnt(err) { return true, err - } else { - return false, err } + + return false, err } // IsCorruptedMnt return true if err is about corrupted mount point