Remove ioutil (#181)

In 1.16, it's now deprecated and replaced by `io` and `os`.  Let's
upgrade!

Test plan:
- make check
- git grep ioutil
This commit is contained in:
Ben Kraft
2022-03-22 12:10:24 -07:00
committed by GitHub
parent 36e86cf97f
commit 000f311254
7 changed files with 15 additions and 19 deletions
+3 -3
View File
@@ -5,7 +5,7 @@ import (
goAst "go/ast"
goParser "go/parser"
goToken "go/token"
"io/ioutil"
"os"
"path/filepath"
"strconv"
"strings"
@@ -25,7 +25,7 @@ func getSchema(globs StringList) (*ast.Schema, error) {
sources := make([]*ast.Source, len(filenames))
for i, filename := range filenames {
text, err := ioutil.ReadFile(filename)
text, err := os.ReadFile(filename)
if err != nil {
return nil, errorf(nil, "unreadable schema file %v: %v", filename, err)
}
@@ -105,7 +105,7 @@ func getQueries(basedir string, globs StringList) (*ast.QueryDocument, error) {
}
for _, filename := range filenames {
text, err := ioutil.ReadFile(filename)
text, err := os.ReadFile(filename)
if err != nil {
return nil, errorf(nil, "unreadable query-spec file %v: %v", filename, err)
}