mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
Merge pull request #87245 from 928234269/fix_staticcheck
fix staticcheck errors in pkg/volume/hostpath.
This commit is contained in:
commit
f88f58cb79
@ -30,7 +30,6 @@ pkg/volume/csi
|
|||||||
pkg/volume/fc
|
pkg/volume/fc
|
||||||
pkg/volume/flexvolume
|
pkg/volume/flexvolume
|
||||||
pkg/volume/flocker
|
pkg/volume/flocker
|
||||||
pkg/volume/hostpath
|
|
||||||
pkg/volume/iscsi
|
pkg/volume/iscsi
|
||||||
pkg/volume/local
|
pkg/volume/local
|
||||||
pkg/volume/portworx
|
pkg/volume/portworx
|
||||||
|
@ -357,9 +357,8 @@ type hostPathTypeChecker interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type fileTypeChecker struct {
|
type fileTypeChecker struct {
|
||||||
path string
|
path string
|
||||||
exists bool
|
hu hostutil.HostUtils
|
||||||
hu hostutil.HostUtils
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ftc *fileTypeChecker) Exists() bool {
|
func (ftc *fileTypeChecker) Exists() bool {
|
||||||
|
@ -327,10 +327,10 @@ func setUp() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
f, err := os.OpenFile("/tmp/ExistingFolder/foo", os.O_CREATE, os.FileMode(0644))
|
f, err := os.OpenFile("/tmp/ExistingFolder/foo", os.O_CREATE, os.FileMode(0644))
|
||||||
defer f.Close()
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
defer f.Close()
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user