all: replace non-trivial uses of package ioutil with os (#24886)

Co-authored-by: Martin Holst Swende <martin@swende.se>
This commit is contained in:
Håvard Anda Estensen
2022-05-17 14:27:04 +02:00
committed by GitHub
co-authored by Martin Holst Swende
parent e644d45c14
commit 4b309c7006
9 changed files with 19 additions and 24 deletions
@@ -18,7 +18,6 @@ package tracetest
import (
"encoding/json"
"io/ioutil"
"math/big"
"os"
"path/filepath"
@@ -136,7 +135,7 @@ func TestCallTracerNative(t *testing.T) {
}
func testCallTracer(tracerName string, dirPath string, t *testing.T) {
files, err := ioutil.ReadDir(filepath.Join("testdata", dirPath))
files, err := os.ReadDir(filepath.Join("testdata", dirPath))
if err != nil {
t.Fatalf("failed to retrieve tracer test suite: %v", err)
}
@@ -241,7 +240,7 @@ func camel(str string) string {
return strings.Join(pieces, "")
}
func BenchmarkTracers(b *testing.B) {
files, err := ioutil.ReadDir(filepath.Join("testdata", "call_tracer"))
files, err := os.ReadDir(filepath.Join("testdata", "call_tracer"))
if err != nil {
b.Fatalf("failed to retrieve tracer test suite: %v", err)
}