all: revert "all: prefer strings.LastIndexByte over strings.LastIndex"

This reverts https://golang.org/cl/66372.

Updates #22148

Change-Id: I3e94af3dfc11a2883bf28e1d5e1f32f98760b3ee
Reviewed-on: https://go-review.googlesource.com/68431
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Marvin Stenger 2017-10-05 15:50:11 +02:00 committed by Ian Lance Taylor
parent 90d71fe99e
commit d153df8e4b
25 changed files with 39 additions and 39 deletions

View file

@ -360,7 +360,7 @@ func (c *common) decorate(s string) string {
_, file, line, ok := runtime.Caller(skip)
if ok {
// Truncate file name at last file name separator.
if index := strings.LastIndexByte(file, '/'); index >= 0 {
if index := strings.LastIndex(file, "/"); index >= 0 {
file = file[index+1:]
} else if index = strings.LastIndex(file, "\\"); index >= 0 {
file = file[index+1:]