mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 00:55:11 +01:00
Remove calls to Go's deprecated "io/ioutil"
This commit is contained in:
1 parent
788479dd64
commit
226c476994
31 files changed
+73
-93
No files matched your search
@@ -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
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user