chore: remove refs to deprecated io/ioutil (#2717)

Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
This commit is contained in:
guangwu
2023-10-16 10:23:50 +08:00
committed by GitHub
parent b617c97342
commit 39d2f293c6
7 changed files with 10 additions and 15 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ package cmdarg
import (
"bytes"
"io"
"io/ioutil"
"os"
)
// LoadArg loads one arg, maybe an remote url, or local file path
@@ -18,7 +18,7 @@ func LoadArg(arg string) (out io.Reader, err error) {
// LoadArgToBytes loads one arg to []byte, maybe an remote url, or local file path
func LoadArgToBytes(arg string) (out []byte, err error) {
out, err = ioutil.ReadFile(arg)
out, err = os.ReadFile(arg)
if err != nil {
return
}