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 /pkg/report/linux_test.go | |
| parent | 9e2ebb3c174f1e168bc1fbadd5f02f2e25e314fc (diff) | |
all: ioutil is deprecated in go1.19 (#3718)
Diffstat (limited to 'pkg/report/linux_test.go')
| -rw-r--r-- | pkg/report/linux_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/report/linux_test.go b/pkg/report/linux_test.go index 5aba2f19e..5f27b9e7d 100644 --- a/pkg/report/linux_test.go +++ b/pkg/report/linux_test.go @@ -6,7 +6,7 @@ package report import ( "bytes" "fmt" - "io/ioutil" + "os" "path/filepath" "reflect" "runtime" @@ -385,7 +385,7 @@ func TestDisassemblyInReports(t *testing.T) { } archPath := filepath.Join("testdata", "linux", "decompile") - subFolders, err := ioutil.ReadDir(archPath) + subFolders, err := os.ReadDir(archPath) if err != nil { t.Fatalf("disassembly reports failed: %v", err) } @@ -400,7 +400,7 @@ func TestDisassemblyInReports(t *testing.T) { } testPath := filepath.Join(archPath, obj.Name()) - testFiles, err := ioutil.ReadDir(testPath) + testFiles, err := os.ReadDir(testPath) if err != nil { t.Fatalf("failed to list tests for %v: %v", obj.Name(), err) } @@ -420,7 +420,7 @@ func TestDisassemblyInReports(t *testing.T) { func testDisassembly(t *testing.T, reporter *Reporter, linuxReporter *linux, testFilePrefix string) { t.Parallel() - input, err := ioutil.ReadFile(testFilePrefix + ".in") + input, err := os.ReadFile(testFilePrefix + ".in") if err != nil { t.Fatalf("failed to read input file: %v", err) } @@ -435,7 +435,7 @@ func testDisassembly(t *testing.T, reporter *Reporter, linuxReporter *linux, tes osutil.WriteFile(testFilePrefix+".out", result) } - output, err := ioutil.ReadFile(testFilePrefix + ".out") + output, err := os.ReadFile(testFilePrefix + ".out") if err != nil { t.Fatalf("failed to read output file: %v", err) } |
