Skip to content

Commit

Permalink
cmd/go/internal/bug: use bytes.Contains
Browse files Browse the repository at this point in the history
Change-Id: I982835eb0d051e48964fc4a66018514c7203dd0a
Reviewed-on: https://go-review.googlesource.com/c/go/+/436696
Auto-Submit: Ian Lance Taylor <[email protected]>
Run-TryBot: Ian Lance Taylor <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
  • Loading branch information
cuiweixie authored and gopherbot committed Sep 29, 2022
1 parent 679640a commit 5613de9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmd/go/internal/bug/bug.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:]))
}
}

0 comments on commit 5613de9

Please sign in to comment.