Skip to content

Commit 4573906

Browse files
committed
Fix calls to deprecated ioutil functions
1 parent 82dc9b8 commit 4573906

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

instrumenter_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"go/parser"
77
"go/printer"
88
"go/token"
9-
"io/ioutil"
9+
"os"
1010
"strings"
1111
"testing"
1212
)
@@ -59,13 +59,13 @@ func Test_instrumenter(t *testing.T) {
5959
t.Run(test.name, func(t *testing.T) {
6060
base := "testdata/instrumenter/" + test.name
6161

62-
goBytes, err := ioutil.ReadFile(base + ".go")
62+
goBytes, err := os.ReadFile(base + ".go")
6363
if err != nil {
6464
panic(err)
6565
}
6666
src := string(goBytes)
6767

68-
gobcoBytes, err := ioutil.ReadFile(base + ".gobco")
68+
gobcoBytes, err := os.ReadFile(base + ".gobco")
6969
if err != nil {
7070
panic(err)
7171
}
@@ -109,7 +109,7 @@ func Test_instrumenter(t *testing.T) {
109109
actual := sb.String()
110110

111111
if actual != expected {
112-
err := ioutil.WriteFile(base+".gobco", []byte(actual), 0o666)
112+
err := os.WriteFile(base+".gobco", []byte(actual), 0o666)
113113
if err != nil {
114114
t.Fatal(err)
115115
}

0 commit comments

Comments
 (0)