aboutsummaryrefslogtreecommitdiff
path: root/src/path/filepath/match_test.go
diff options
context:
space:
mode:
authorNathan VanBenschoten <nvanbenschoten@gmail.com>2015-12-22 02:40:47 -0500
committerRuss Cox <rsc@golang.org>2016-02-19 01:06:05 +0000
commitb04f3b06ec347543b0eafe82dcfb0e05885d3feb (patch)
treec9d889546ef895fce8b8a2c04c7e06cc998c1842 /src/path/filepath/match_test.go
parent952c2fd606fad19b930937ca0d5c5571d7f5d4cb (diff)
downloadgo-b04f3b06ec347543b0eafe82dcfb0e05885d3feb.tar.xz
all: replace strings.Index with strings.Contains where possible
Change-Id: Ia613f1c37bfce800ece0533a5326fca91d99a66a Reviewed-on: https://go-review.googlesource.com/18120 Reviewed-by: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'src/path/filepath/match_test.go')
-rw-r--r--src/path/filepath/match_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/path/filepath/match_test.go b/src/path/filepath/match_test.go
index 0edbfc70c4..d8bab7f4da 100644
--- a/src/path/filepath/match_test.go
+++ b/src/path/filepath/match_test.go
@@ -88,7 +88,7 @@ func TestMatch(t *testing.T) {
pattern := tt.pattern
s := tt.s
if runtime.GOOS == "windows" {
- if strings.Index(pattern, "\\") >= 0 {
+ if strings.Contains(pattern, "\\") {
// no escape allowed on windows.
continue
}