mirror of
https://github.com/golang/go
synced 2024-11-02 13:21:55 +00:00
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 <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
parent
679640aee8
commit
5613de9d47
1 changed files with 1 additions and 1 deletions
|
@ -217,7 +217,7 @@ func printGlibcVersion(w io.Writer) {
|
||||||
fmt.Fprintf(w, "%s: %s\n", m[1], firstLine(out))
|
fmt.Fprintf(w, "%s: %s\n", m[1], firstLine(out))
|
||||||
|
|
||||||
// print another line (the one containing version string) in case of musl libc
|
// 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:]))
|
fmt.Fprintf(w, "%s\n", firstLine(out[idx+1:]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue