MCPcopy Create free account
hub / github.com/temporalio/temporal / functionNameForPC

Function functionNameForPC

common/testing/runtime/goroutine.go:132–140  ·  view source on GitHub ↗
(pc uintptr)

Source from the content-addressed store, hash-verified

130}
131
132func functionNameForPC(pc uintptr) (string, bool) {
133 fn := runtime.FuncForPC(pc)
134 if fn == nil {
135 return "", false
136 }
137 elements := strings.Split(fn.Name(), ".")
138 shortName := elements[len(elements)-1]
139 return strings.TrimSuffix(shortName, "-fm"), true
140}

Callers 1

functionNameFunction · 0.85

Calls 2

SplitMethod · 0.65
NameMethod · 0.65

Tested by

no test coverage detected