diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2013-08-05 15:46:06 -0700 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2013-08-05 15:46:06 -0700 |
| commit | 4c772cda54896b0213b5eaffed81031e259f26d4 (patch) | |
| tree | 7f35df71fac8407b6236439ddfd060a5db80312f /src/pkg/path | |
| parent | dd6f49ddca0f54767d5cc26b5627f025f63cbcc3 (diff) | |
| download | go-4c772cda54896b0213b5eaffed81031e259f26d4.tar.xz | |
all: use strings.IndexByte instead of Index where possible
R=golang-dev, khr
CC=golang-dev
https://golang.org/cl/12486043
Diffstat (limited to 'src/pkg/path')
| -rw-r--r-- | src/pkg/path/match.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/path/match.go b/src/pkg/path/match.go index 8154bf6025..d811303500 100644 --- a/src/pkg/path/match.go +++ b/src/pkg/path/match.go @@ -43,7 +43,7 @@ Pattern: star, chunk, pattern = scanChunk(pattern) if star && chunk == "" { // Trailing * matches rest of string unless it has a /. - return strings.Index(name, "/") < 0, nil + return strings.IndexByte(name, '/') < 0, nil } // Look for match at current position. t, ok, err := matchChunk(chunk, name) |
