aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/debug
diff options
context:
space:
mode:
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 ""