aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/syntax/nodes_test.go
diff options
context:
space:
mode:
authorMarvin Stenger <marvin.stenger94@gmail.com>2017-10-05 15:49:32 +0200
committerIan Lance Taylor <iant@golang.org>2017-10-05 23:19:10 +0000
commit90d71fe99e21b68e292327c966946f1706d66514 (patch)
tree1eb63d7ee1c5bf5be76b5a69364416603597f573 /src/cmd/compile/internal/syntax/nodes_test.go
parent7e31d9b9f7e8e4e72472cfcbd807b5672806635a (diff)
downloadgo-90d71fe99e21b68e292327c966946f1706d66514.tar.gz
go-90d71fe99e21b68e292327c966946f1706d66514.zip
all: revert "all: prefer strings.IndexByte over strings.Index"
This reverts https://golang.org/cl/65930. Fixes #22148 Change-Id: Ie0712621ed89c43bef94417fc32de9af77607760 Reviewed-on: https://go-review.googlesource.com/68430 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/syntax/nodes_test.go')
-rw-r--r--src/cmd/compile/internal/syntax/nodes_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/syntax/nodes_test.go b/src/cmd/compile/internal/syntax/nodes_test.go
index 9d7beb997f..1bba9eeacf 100644
--- a/src/cmd/compile/internal/syntax/nodes_test.go
+++ b/src/cmd/compile/internal/syntax/nodes_test.go
@@ -313,7 +313,7 @@ func testPos(t *testing.T, list []test, prefix, suffix string, extract func(*Fil
}
func stripAt(s string) (string, int) {
- if i := strings.IndexByte(s, '@'); i >= 0 {
+ if i := strings.Index(s, "@"); i >= 0 {
return s[:i] + s[i+1:], i
}
return s, -1