chore: io/ioutil has been deprecated
This commit is contained in:
@@ -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)
|
||||
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user