functionName is an adapted copy of the same function in package sentry-go.
(fnName string)
| 109 | |
| 110 | // functionName is an adapted copy of the same function in package sentry-go. |
| 111 | func functionName(fnName string) (pack string, name string) { |
| 112 | name = fnName |
| 113 | // We get this: |
| 114 | // runtime/debug.*T·ptrmethod |
| 115 | // and want this: |
| 116 | // pack = runtime/debug |
| 117 | // name = *T.ptrmethod |
| 118 | if idx := strings.LastIndex(name, "."); idx != -1 { |
| 119 | pack = name[:idx] |
| 120 | name = name[idx+1:] |
| 121 | } |
| 122 | name = strings.Replace(name, "·", ".", -1) |
| 123 | return |
| 124 | } |
| 125 | |
| 126 | // parsePrintedStack reverse-engineers a reportable stack trace from |
| 127 | // the result of printing a github.com/pkg/errors stack trace with format %+v. |
no outgoing calls
no test coverage detected
searching dependent graphs…