Remove calls to Go's deprecated "io/ioutil"

This commit is contained in:
Nigel Tao committed 2021-08-22 11:17:34 +10:00
1 parent 788479dd64
commit 226c476994
31 files changed
+73 -93

No files matched your search

+1 -2
View File
@@ -18,7 +18,6 @@ import (
"bytes"
"flag"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"sort"
@@ -83,7 +82,7 @@ func doGenrelease(args []string) error {
}
relFilename := filename[len(baseDirSlash):]
s, err := ioutil.ReadFile(filename)
s, err := os.ReadFile(filename)
if err != nil {
return err
}
+1 -2
View File
@@ -18,7 +18,6 @@ import (
"bufio"
"flag"
"fmt"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
@@ -83,7 +82,7 @@ func doBenchTest(args []string, bench bool) error {
func doBenchTest1(filename string, bench bool, ccompilers string, focus string,
iterscale int, mimic bool, reps int) (failed bool, err error) {
workDir, err := ioutil.TempDir("", "wuffs-c")
workDir, err := os.MkdirTemp("", "wuffs-c")
if err != nil {
return false, err
}