Skip to content

Commit 41bb49b

Browse files
author
Bryan C. Mills
committed
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 <[email protected]> Run-TryBot: Bryan C. Mills <[email protected]> Reviewed-by: Jay Conrod <[email protected]> TryBot-Result: Go Bot <[email protected]>
1 parent 725a642 commit 41bb49b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cmd/go/testdata/script/build_trimpath.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ package main
121121
import (
122122
"bytes"
123123
"fmt"
124+
"io/ioutil"
124125
"log"
125126
"os"
126127
"os/exec"
@@ -130,7 +131,7 @@ import (
130131

131132
func main() {
132133
exe := os.Args[1]
133-
data, err := os.ReadFile(exe)
134+
data, err := ioutil.ReadFile(exe)
134135
if err != nil {
135136
log.Fatal(err)
136137
}

0 commit comments

Comments
 (0)