strings: Contains
Tiny helper to avoid strings.Index(s, sub) != -1
R=rsc, r2, r
CC=golang-dev
https://golang.org/cl/2265044
diff --git a/src/pkg/exec/lp_unix.go b/src/pkg/exec/lp_unix.go
index 10f3da1..b2feecd 100644
--- a/src/pkg/exec/lp_unix.go
+++ b/src/pkg/exec/lp_unix.go
@@ -25,7 +25,7 @@
// (only bypass the path if file begins with / or ./ or ../)
// but that would not match all the Unix shells.
- if strings.Index(file, "/") >= 0 {
+ if strings.Contains(file, "/") {
if canExec(file) {
return file, nil
}