1
0
mirror of https://github.com/golang/go synced 2024-11-11 19:31:37 -07:00

misc/cgo: replace ioutil.ReadFile with os.ReadFile

For #45557

Change-Id: I25be5b437fa1c9b0e0c46802a9b37efc2d47bca0
Reviewed-on: https://go-review.googlesource.com/c/go/+/431097
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
This commit is contained in:
hopehook 2022-09-16 09:21:59 +08:00 committed by Gopher Robot
parent 351037d16c
commit c91b1009d5

View File

@ -12,7 +12,6 @@ import (
"go/ast"
"go/parser"
"go/token"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
@ -88,7 +87,7 @@ func TestArgumentsPositions(t *testing.T) {
if err != nil {
t.Fatalf("%s: %v\n%s", cmd, err, cmd.Stderr)
}
mainProcessed, err := ioutil.ReadFile(filepath.Join(dir, "issue42580.cgo1.go"))
mainProcessed, err := os.ReadFile(filepath.Join(dir, "issue42580.cgo1.go"))
if err != nil {
t.Fatal(err)
}