remove ioutil in kubelet

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero
2022-04-27 19:03:20 +08:00
parent 537941765f
commit 4fac7486d4
8 changed files with 20 additions and 22 deletions

View File

@@ -35,7 +35,7 @@ import (
)
func validateDirExists(dir string) error {
_, err := ioutil.ReadDir(dir)
_, err := os.ReadDir(dir)
if err != nil {
return err
}
@@ -43,7 +43,7 @@ func validateDirExists(dir string) error {
}
func validateDirNotExists(dir string) error {
_, err := ioutil.ReadDir(dir)
_, err := os.ReadDir(dir)
if os.IsNotExist(err) {
return nil
}