Merge pull request #87245 from 928234269/fix_staticcheck

fix staticcheck errors in pkg/volume/hostpath.
This commit is contained in:
Kubernetes Prow Robot 2020-01-17 12:15:18 -08:00 committed by GitHub
commit f88f58cb79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 5 deletions

View File

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

View File

@ -358,7 +358,6 @@ type hostPathTypeChecker interface {
type fileTypeChecker struct {
path string
exists bool
hu hostutil.HostUtils
}

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
}