From 28d389ef30fc4c542a80603123990115035c6422 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 23 Jan 2025 17:37:29 -0800 Subject: [PATCH] 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 Reviewed-by: Ian Lance Taylor Auto-Submit: Ian Lance Taylor Commit-Queue: Ian Lance Taylor LUCI-TryBot-Result: Go LUCI --- src/internal/godebug/godebug_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/internal/godebug/godebug_test.go b/src/internal/godebug/godebug_test.go index 6929630356..fe1e67225c 100644 --- a/src/internal/godebug/godebug_test.go +++ b/src/internal/godebug/godebug_test.go @@ -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)) -- 2.48.1