diff options
| author | Taras Madan <tarasmadan@google.com> | 2023-02-23 14:28:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-23 14:28:18 +0100 |
| commit | 4359978ef22a22ddd5a19adf18cbc80cb44244fb (patch) | |
| tree | 7952da94e27417b39ddf952d9e0bab431dafc4c5 /tools/syz-bisect | |
| parent | 9e2ebb3c174f1e168bc1fbadd5f02f2e25e314fc (diff) | |
all: ioutil is deprecated in go1.19 (#3718)
Diffstat (limited to 'tools/syz-bisect')
| -rw-r--r-- | tools/syz-bisect/bisect.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/syz-bisect/bisect.go b/tools/syz-bisect/bisect.go index 7fa17c25d..ba4494d18 100644 --- a/tools/syz-bisect/bisect.go +++ b/tools/syz-bisect/bisect.go @@ -22,7 +22,6 @@ import ( "encoding/json" "flag" "fmt" - "io/ioutil" "os" "path/filepath" @@ -86,7 +85,7 @@ func main() { os.Exit(1) } if mgrcfg.Workdir == "" { - mgrcfg.Workdir, err = ioutil.TempDir("", "syz-bisect") + mgrcfg.Workdir, err = os.MkdirTemp("", "syz-bisect") if err != nil { fmt.Fprintf(os.Stderr, "failed to create temp dir: %v\n", err) os.Exit(1) @@ -150,7 +149,7 @@ func loadFile(path, file string, dst *[]byte, mandatory bool) { if !mandatory && !osutil.IsExist(filename) { return } - data, err := ioutil.ReadFile(filename) + data, err := os.ReadFile(filename) if err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) |
