fix staticcheck errors in pkg/volume/hostpath.

Signed-off-by: Sakura <longfei.shang@daocloud.io>
This commit is contained in:
Sakura 2020-01-15 22:54:48 +08:00
parent 50437b4c5d
commit 4143bc7a96
No known key found for this signature in database
GPG Key ID: 07F5F462F68548F1
2 changed files with 1 additions and 2 deletions

View File

@ -48,7 +48,6 @@ pkg/volume/emptydir
pkg/volume/fc
pkg/volume/flexvolume
pkg/volume/flocker
pkg/volume/hostpath
pkg/volume/iscsi
pkg/volume/local
pkg/volume/portworx

View File

@ -327,10 +327,10 @@ func setUp() error {
}
f, err := os.OpenFile("/tmp/ExistingFolder/foo", os.O_CREATE, os.FileMode(0644))
defer f.Close()
if err != nil {
return err
}
defer f.Close()
return nil
}