diff --git a/src/cmd/go/internal/bug/bug.go b/src/cmd/go/internal/bug/bug.go index 772b6d5dc74..e667012fbbb 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:])) } }