diff --git a/_codegen/main.go b/_codegen/main.go index 7158afc9f..e193a74a5 100644 --- a/_codegen/main.go +++ b/_codegen/main.go @@ -16,7 +16,6 @@ import ( "go/token" "go/types" "io" - "io/ioutil" "log" "os" "path" @@ -101,7 +100,7 @@ func parseTemplates() (*template.Template, *template.Template, error) { return nil, nil, err } if *tmplFile != "" { - f, err := ioutil.ReadFile(*tmplFile) + f, err := os.ReadFile(*tmplFile) if err != nil { return nil, nil, err } @@ -183,7 +182,7 @@ func parsePackageSource(pkg string) (*types.Scope, *doc.Package, error) { files := make(map[string]*ast.File) fileList := make([]*ast.File, len(pd.GoFiles)) for i, fname := range pd.GoFiles { - src, err := ioutil.ReadFile(path.Join(pd.Dir, fname)) + src, err := os.ReadFile(path.Join(pd.Dir, fname)) if err != nil { return nil, nil, err } diff --git a/suite/suite_test.go b/suite/suite_test.go index b97eb4311..eceecb622 100644 --- a/suite/suite_test.go +++ b/suite/suite_test.go @@ -4,7 +4,7 @@ import ( "bytes" "errors" "flag" - "io/ioutil" + "io" "math/rand" "os" "os/exec" @@ -440,7 +440,7 @@ func (sc *StdoutCapture) StopCapture() (string, error) { } os.Stdout.Close() os.Stdout = sc.oldStdout - bytes, err := ioutil.ReadAll(sc.readPipe) + bytes, err := io.ReadAll(sc.readPipe) if err != nil { return "", err }