MCPcopy Index your code
hub / github.com/pkg/errors / funcname

Function funcname

stack.go:172–177  ·  view source on GitHub ↗

funcname removes the path prefix component of a function's name reported by func.Name().

(name string)

Source from the content-addressed store, hash-verified

170
171// funcname removes the path prefix component of a function's name reported by func.Name().
172func funcname(name string) string {
173 i := strings.LastIndex(name, "/")
174 name = name[i+1:]
175 i = strings.Index(name, ".")
176 return name[i+1:]
177}

Callers 2

TestFuncnameFunction · 0.85
FormatMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestFuncnameFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…