MCPcopy Index your code
hub / github.com/cockroachdb/errors / functionName

Function functionName

withstack/reportable.go:111–124  ·  view source on GitHub ↗

functionName is an adapted copy of the same function in package sentry-go.

(fnName string)

Source from the content-addressed store, hash-verified

109
110// functionName is an adapted copy of the same function in package sentry-go.
111func 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.

Callers 2

parsePrintedStackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…