aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/debug
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2013-08-05 15:46:06 -0700
committerBrad Fitzpatrick <bradfitz@golang.org>2013-08-05 15:46:06 -0700
commit4c772cda54896b0213b5eaffed81031e259f26d4 (patch)
tree7f35df71fac8407b6236439ddfd060a5db80312f /src/pkg/debug
parentdd6f49ddca0f54767d5cc26b5627f025f63cbcc3 (diff)
downloadgo-4c772cda54896b0213b5eaffed81031e259f26d4.tar.xz
all: use strings.IndexByte instead of Index where possible
R=golang-dev, khr CC=golang-dev https://golang.org/cl/12486043
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 9ab05bac2f..c6952af55c 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.Index(s.Name, "."); i != -1 {
+ if i := strings.IndexByte(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.Index(s.Name, ".")
+ l := strings.IndexByte(s.Name, '.')
r := strings.LastIndex(s.Name, ".")
if l == -1 || r == -1 || l == r {
return ""