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>
This commit is contained in:
Marvin Stenger 2017-10-05 15:49:32 +02:00 committed by Ian Lance Taylor
parent 7e31d9b9f7
commit 90d71fe99e
55 changed files with 81 additions and 81 deletions

View file

@ -204,7 +204,7 @@ func (p *Package) loadDefines(f *File) {
line = strings.TrimSpace(line[8:])
var key, val string
spaceIndex := strings.IndexByte(line, ' ')
spaceIndex := strings.Index(line, " ")
tabIndex := strings.Index(line, "\t")
if spaceIndex == -1 && tabIndex == -1 {
@ -364,11 +364,11 @@ func (p *Package) guessKinds(f *File) []*Name {
continue
}
c1 := strings.IndexByte(line, ':')
c1 := strings.Index(line, ":")
if c1 < 0 {
continue
}
c2 := strings.IndexByte(line[c1+1:], ':')
c2 := strings.Index(line[c1+1:], ":")
if c2 < 0 {
continue
}
@ -2538,7 +2538,7 @@ func fieldPrefix(fld []*ast.Field) string {
if strings.HasPrefix(n.Name, "orig_") || strings.HasPrefix(n.Name, "_") {
continue
}
i := strings.IndexByte(n.Name, '_')
i := strings.Index(n.Name, "_")
if i < 0 {
continue
}