From 2c58d0c2429366f8b86a2326e0cf9015975e60e4 Mon Sep 17 00:00:00 2001 From: aarzilli Date: Sat, 2 Jan 2016 13:03:25 +0100 Subject: [PATCH] bugfix: proc/types: loadPackageMap and github.com packages Makes loadPackageMap actually work with github.com/... packages --- proc/types.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/proc/types.go b/proc/types.go index 32e9752b..50a86063 100644 --- a/proc/types.go +++ b/proc/types.go @@ -38,16 +38,10 @@ func (dbp *Process) findTypeExpr(expr ast.Expr) (dwarf.Type, error) { } func complexType(typename string) bool { - dot := 0 for _, ch := range typename { switch ch { case '*', '[', '<', '{', '(', ' ': return true - case '.': - dot++ - if dot > 1 { - return true - } } } return false @@ -73,7 +67,7 @@ func (dbp *Process) loadPackageMap() error { continue } - dot := strings.Index(typename, ".") + dot := strings.LastIndex(typename, ".") if dot < 0 { continue }