diff options
author | Bryan C. Mills <bcmills@google.com> | 2021-01-28 11:14:23 -0500 |
---|---|---|
committer | Bryan C. Mills <bcmills@google.com> | 2021-01-28 16:35:06 +0000 |
commit | 41bb49b878ce4dd24c0055aaf734577d3fb37d50 (patch) | |
tree | e01ad146372a0064e3cf9f33a87e76e1cdc273fb | |
parent | 725a642c2d0b42e2b4435dfbfbff6b138d37d2ce (diff) | |
download | go-41bb49b878ce4dd24c0055aaf734577d3fb37d50.tar.gz go-41bb49b878ce4dd24c0055aaf734577d3fb37d50.zip |
cmd/go: revert TestScript/build_trimpath to use ioutil.ReadFile
This call was changed to os.ReadFile in CL 266365, but the test also
builds that source file using gccgo if present, and released versions
of gccgo do not yet support ioutil.ReadFile.
Manually tested with gccgo gccgo 10.2.1 (see #35786).
Fixes #43974.
Updates #42026.
Change-Id: Ic4ca0848d3ca324e2ab10fd14ad867f21e0898e3
Reviewed-on: https://go-review.googlesource.com/c/go/+/287613
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
-rw-r--r-- | src/cmd/go/testdata/script/build_trimpath.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cmd/go/testdata/script/build_trimpath.txt b/src/cmd/go/testdata/script/build_trimpath.txt index e1ea0a48b2..2c3bee8fdc 100644 --- a/src/cmd/go/testdata/script/build_trimpath.txt +++ b/src/cmd/go/testdata/script/build_trimpath.txt @@ -121,6 +121,7 @@ package main import ( "bytes" "fmt" + "io/ioutil" "log" "os" "os/exec" @@ -130,7 +131,7 @@ import ( func main() { exe := os.Args[1] - data, err := os.ReadFile(exe) + data, err := ioutil.ReadFile(exe) if err != nil { log.Fatal(err) } |