contrib: remove refs to deprecated io/ioutil

Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
This commit is contained in:
guoguangwu 2023-07-08 13:51:22 +08:00 committed by mergify[bot]
parent 448e4b7f5c
commit 0d7e4e6347
1 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ import (
"go/build/constraint"
"go/parser"
"go/token"
"io/ioutil"
"os"
"path"
"regexp"
"strings"
@ -218,7 +218,7 @@ func CephGoFunctions(source, packageName string, ii *Inspector) error {
}
for _, fname := range toCheck {
logger.Printf("Reading go file: %v\n", fname)
src, err := ioutil.ReadFile(path.Join(p.Dir, fname))
src, err := os.ReadFile(path.Join(p.Dir, fname))
if err != nil {
return err
}