From 5613de9d47b518496b487804806db933b5ea375a Mon Sep 17 00:00:00 2001 From: cuiweixie Date: Thu, 29 Sep 2022 20:35:12 +0800 Subject: [PATCH] cmd/go/internal/bug: use bytes.Contains Change-Id: I982835eb0d051e48964fc4a66018514c7203dd0a Reviewed-on: https://go-review.googlesource.com/c/go/+/436696 Auto-Submit: Ian Lance Taylor Run-TryBot: Ian Lance Taylor Reviewed-by: Dmitri Shuralyov TryBot-Result: Gopher Robot Reviewed-by: Ian Lance Taylor --- src/cmd/go/internal/bug/bug.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/go/internal/bug/bug.go b/src/cmd/go/internal/bug/bug.go index 772b6d5dc7..e667012fbb 100644 --- a/src/cmd/go/internal/bug/bug.go +++ b/src/cmd/go/internal/bug/bug.go @@ -217,7 +217,7 @@ func printGlibcVersion(w io.Writer) { fmt.Fprintf(w, "%s: %s\n", m[1], firstLine(out)) // print another line (the one containing version string) in case of musl libc - if idx := bytes.IndexByte(out, '\n'); bytes.Index(out, []byte("musl")) != -1 && idx > -1 { + if idx := bytes.IndexByte(out, '\n'); bytes.Contains(out, []byte("musl")) && idx > -1 { fmt.Fprintf(w, "%s\n", firstLine(out[idx+1:])) } } -- 2.50.0