aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/debug
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2013-08-05 16:27:24 -0700
committerBrad Fitzpatrick <bradfitz@golang.org>2013-08-05 16:27:24 -0700
commitd8e27db39562d2106f0c9cf7518eaa9ade748a4f (patch)
treea351ba05c9845f850854c3f7316a91589a4099de /src/pkg/debug
parent4c772cda54896b0213b5eaffed81031e259f26d4 (diff)
downloadgo-d8e27db39562d2106f0c9cf7518eaa9ade748a4f.tar.xz
undo CL 12486043 / ab644299d124
Uglier. ««« original CL description all: use strings.IndexByte instead of Index where possible R=golang-dev, khr CC=golang-dev https://golang.org/cl/12486043 »»» R=golang-dev CC=golang-dev https://golang.org/cl/12485044
Diffstat (limited to 'src/pkg/debug')
-rw-r--r--src/pkg/debug/gosym/symtab.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/debug/gosym/symtab.go b/src/pkg/debug/gosym/symtab.go
index c6952af55c..9ab05bac2f 100644
--- a/src/pkg/debug/gosym/symtab.go
+++ b/src/pkg/debug/gosym/symtab.go
@@ -40,7 +40,7 @@ func (s *Sym) Static() bool { return s.Type >= 'a' }
// PackageName returns the package part of the symbol name,
// or the empty string if there is none.
func (s *Sym) PackageName() string {
- if i := strings.IndexByte(s.Name, '.'); i != -1 {
+ if i := strings.Index(s.Name, "."); i != -1 {
return s.Name[0:i]
}
return ""
@@ -49,7 +49,7 @@ func (s *Sym) PackageName() string {
// ReceiverName returns the receiver type name of this symbol,
// or the empty string if there is none.
func (s *Sym) ReceiverName() string {
- l := strings.IndexByte(s.Name, '.')
+ l := strings.Index(s.Name, ".")
r := strings.LastIndex(s.Name, ".")
if l == -1 || r == -1 || l == r {
return ""