diff options
| author | Marvin Stenger <marvin.stenger94@gmail.com> | 2017-10-05 15:49:32 +0200 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2017-10-05 23:19:10 +0000 |
| commit | 90d71fe99e21b68e292327c966946f1706d66514 (patch) | |
| tree | 1eb63d7ee1c5bf5be76b5a69364416603597f573 /src/debug | |
| parent | 7e31d9b9f7e8e4e72472cfcbd807b5672806635a (diff) | |
| download | go-90d71fe99e21b68e292327c966946f1706d66514.tar.xz | |
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/debug')
| -rw-r--r-- | src/debug/gosym/symtab.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/debug/gosym/symtab.go b/src/debug/gosym/symtab.go index eab255a359..fd8703b36b 100644 --- a/src/debug/gosym/symtab.go +++ b/src/debug/gosym/symtab.go @@ -45,7 +45,7 @@ func (s *Sym) PackageName() string { pathend = 0 } - if i := strings.IndexByte(s.Name[pathend:], '.'); i != -1 { + if i := strings.Index(s.Name[pathend:], "."); i != -1 { return s.Name[:pathend+i] } return "" @@ -58,7 +58,7 @@ func (s *Sym) ReceiverName() string { if pathend < 0 { pathend = 0 } - l := strings.IndexByte(s.Name[pathend:], '.') + l := strings.Index(s.Name[pathend:], ".") r := strings.LastIndexByte(s.Name[pathend:], '.') if l == -1 || r == -1 || l == r { return "" |
