remove ioutil usage in all project

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero
2022-04-03 15:53:19 +08:00
parent 1aa87538a7
commit 303ef9cd80
14 changed files with 28 additions and 38 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
package state
import (
"io/ioutil"
"os"
"path/filepath"
"testing"
@@ -28,7 +28,7 @@ func newLoader() *EnvironmentValuesLoader {
readFile := func(s string) ([]byte, error) { return []byte{}, nil }
dirExists := func(d string) bool { return false }
fileExists := func(f string) bool { return false }
return NewEnvironmentValuesLoader(storage, ioutil.ReadFile, sugar, remote.NewRemote(sugar, "/tmp", readFile, dirExists, fileExists))
return NewEnvironmentValuesLoader(storage, os.ReadFile, sugar, remote.NewRemote(sugar, "/tmp", readFile, dirExists, fileExists))
}
// See https://github.com/roboll/helmfile/pull/1169