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-reporter | |
| parent | 9e2ebb3c174f1e168bc1fbadd5f02f2e25e314fc (diff) | |
all: ioutil is deprecated in go1.19 (#3718)
Diffstat (limited to 'tools/syz-reporter')
| -rw-r--r-- | tools/syz-reporter/reporter.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/syz-reporter/reporter.go b/tools/syz-reporter/reporter.go index e0d88c1a6..f9d482c6b 100644 --- a/tools/syz-reporter/reporter.go +++ b/tools/syz-reporter/reporter.go @@ -15,7 +15,6 @@ import ( "flag" "fmt" "io" - "io/ioutil" "log" "os" "os/exec" @@ -140,7 +139,7 @@ func readCrash(workdir, dir string) *UICrashType { return nil } defer descFile.Close() - descBytes, err := ioutil.ReadAll(descFile) + descBytes, err := io.ReadAll(descFile) if err != nil || len(descBytes) == 0 { return nil } @@ -168,7 +167,7 @@ func readCrash(workdir, dir string) *UICrashType { } if strings.HasPrefix(f, "tag") { - tag, err := ioutil.ReadFile(filepath.Join(crashdir, dir, f)) + tag, err := os.ReadFile(filepath.Join(crashdir, dir, f)) if err == nil { reproducers[string(tag)] = string(tag) } @@ -179,19 +178,19 @@ func readCrash(workdir, dir string) *UICrashType { } if f == "cause.commit" { - commits, err := ioutil.ReadFile(filepath.Join(crashdir, dir, f)) + commits, err := os.ReadFile(filepath.Join(crashdir, dir, f)) if err == nil { causingCommits = strings.Split(string(commits), "\n") } } if f == "fix.commit" { - commits, err := ioutil.ReadFile(filepath.Join(crashdir, dir, f)) + commits, err := os.ReadFile(filepath.Join(crashdir, dir, f)) if err == nil { fixingCommits = strings.Split(string(commits), "\n") } } if f == kconfig.CauseConfigFile { - configs, err := ioutil.ReadFile(filepath.Join(crashdir, dir, f)) + configs, err := os.ReadFile(filepath.Join(crashdir, dir, f)) if err == nil { configsList := strings.Split(string(configs), "\n") // Ignore configuration list longer than 10 |
