From 4359978ef22a22ddd5a19adf18cbc80cb44244fb Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Thu, 23 Feb 2023 14:28:18 +0100 Subject: all: ioutil is deprecated in go1.19 (#3718) --- pkg/report/linux_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'pkg/report/linux_test.go') 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) } -- cgit mrf-deployment