// Frames returns at most max callstack Frames, starting with its caller and // skipping skip Frames. func Frames(skip, max int) []runtime.Frame { … } // Match returns the first stack frame for which the predicate function returns // true. Returns nil if no match is found. Starts matching after skip frames, // starting with its caller. func Match(skip int, predicate func(runtime.Frame) bool) *runtime.Frame { … } // Main returns the main() function Frame. func Main() *runtime.Frame { … } // ExternalCaller returns the first frame outside the callers package. func ExternalCaller() *runtime.Frame { … } func pkg(ident string) string { … }