internal/godebug: check error from os.ReadFile in test

Change-Id: I4770443c8eaa12add2e04cbf9d18ebfbbd851162
Reviewed-on: https://go-review.googlesource.com/c/go/+/643259
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
Ian Lance Taylor 2025-01-23 17:37:29 -08:00 committed by Gopher Robot
parent 8071f2a169
commit 28d389ef30

View file

@ -109,6 +109,9 @@ func TestCmdBisect(t *testing.T) {
var want []string
src, err := os.ReadFile("godebug_test.go")
if err != nil {
t.Fatal(err)
}
for i, line := range strings.Split(string(src), "\n") {
if strings.Contains(line, "BISECT"+" "+"BUG") {
want = append(want, fmt.Sprintf("godebug_test.go:%d", i+1))