(fn *runtime.Func)
| 97 | } |
| 98 | |
| 99 | func packageAndName(fn *runtime.Func) (string, string) { |
| 100 | name := fn.Name() |
| 101 | pkg := "" |
| 102 | |
| 103 | // The name includes the path name to the package, which is unnecessary |
| 104 | // since the file name is already included. Plus, it has center dots. |
| 105 | // That is, we see |
| 106 | // runtime/debug.*T·ptrmethod |
| 107 | // and want |
| 108 | // *T.ptrmethod |
| 109 | // Since the package path might contains dots (e.g. code.google.com/...), |
| 110 | // we first remove the path prefix if there is one. |
| 111 | if lastslash := strings.LastIndex(name, "/"); lastslash >= 0 { |
| 112 | pkg += name[:lastslash] + "/" |
| 113 | name = name[lastslash+1:] |
| 114 | } |
| 115 | if period := strings.Index(name, "."); period >= 0 { |
| 116 | pkg += name[:period] |
| 117 | name = name[period+1:] |
| 118 | } |
| 119 | |
| 120 | name = strings.Replace(name, "·", ".", -1) |
| 121 | return pkg, name |
| 122 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…