diff options
author | Marvin Stenger <marvin.stenger94@gmail.com> | 2017-10-05 15:50:11 +0200 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2017-10-05 23:19:42 +0000 |
commit | d153df8e4b5874692f4948e9c8e10720446058e3 (patch) | |
tree | 84567a80b3f90d91bb6d1832073505427c51d67c /src/cmd/fix | |
parent | 90d71fe99e21b68e292327c966946f1706d66514 (diff) | |
download | go-d153df8e4b5874692f4948e9c8e10720446058e3.tar.gz go-d153df8e4b5874692f4948e9c8e10720446058e3.zip |
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>
Diffstat (limited to 'src/cmd/fix')
-rw-r--r-- | src/cmd/fix/fix.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/fix/fix.go b/src/cmd/fix/fix.go index ebed82fbeb..03c828a581 100644 --- a/src/cmd/fix/fix.go +++ b/src/cmd/fix/fix.go @@ -719,7 +719,7 @@ func usesImport(f *ast.File, path string) (used bool) { case "<nil>": // If the package name is not explicitly specified, // make an educated guess. This is not guaranteed to be correct. - lastSlash := strings.LastIndexByte(path, '/') + lastSlash := strings.LastIndex(path, "/") if lastSlash == -1 { name = path } else { |