| commit | d153df8e4b5874692f4948e9c8e10720446058e3 | [log] [tgz] |
|---|---|---|
| author | Marvin Stenger <marvin.stenger94@gmail.com> | Thu Oct 05 15:50:11 2017 +0200 |
| committer | Ian Lance Taylor <iant@golang.org> | Thu Oct 05 23:19:42 2017 +0000 |
| tree | 84567a80b3f90d91bb6d1832073505427c51d67c | |
| parent | 90d71fe99e21b68e292327c966946f1706d66514 [diff] [blame] |
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>
diff --git a/src/encoding/xml/marshal.go b/src/encoding/xml/marshal.go index 773f0f2..42133a7 100644 --- a/src/encoding/xml/marshal.go +++ b/src/encoding/xml/marshal.go
@@ -333,7 +333,7 @@ // Pick a name. We try to use the final element of the path // but fall back to _. prefix := strings.TrimRight(url, "/") - if i := strings.LastIndexByte(prefix, '/'); i >= 0 { + if i := strings.LastIndex(prefix, "/"); i >= 0 { prefix = prefix[i+1:] } if prefix == "" || !isName([]byte(prefix)) || strings.Contains(prefix, ":") {