chore: io/ioutil has been deprecated

This commit is contained in:
Christian Schwarz
2024-09-08 13:15:26 +00:00
parent 48c5b60024
commit 740ab4b1b2
9 changed files with 11 additions and 20 deletions
+1 -2
View File
@@ -6,7 +6,6 @@ import (
"go/format"
"go/parser"
"go/token"
"io/ioutil"
"os"
"sort"
"strings"
@@ -132,7 +131,7 @@ var Cases = []Case {
formatted, err := format.Source(buf.Bytes())
check(err)
err = ioutil.WriteFile("generated_cases.go", formatted, 0664)
err = os.WriteFile("generated_cases.go", formatted, 0664)
check(err)
}
+2 -3
View File
@@ -3,7 +3,6 @@ package tests
import (
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
"path"
@@ -102,7 +101,7 @@ func SendStreamCloseAfterEOFRead(ctx *platformtest.Context) {
sendStream := sendStreamTest(ctx)
_, err := io.Copy(ioutil.Discard, sendStream)
_, err := io.Copy(io.Discard, sendStream)
require.NoError(ctx, err)
var buf [128]byte
@@ -122,7 +121,7 @@ func SendStreamMultipleCloseAfterEOF(ctx *platformtest.Context) {
sendStream := sendStreamTest(ctx)
_, err := io.Copy(ioutil.Discard, sendStream)
_, err := io.Copy(io.Discard, sendStream)
require.NoError(ctx, err)
var buf [128]byte