Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReturnTypes ¶
func ReturnTypes(t interface{}) []string
ReturnTypes takes a func and returns a slice of string'd types.
Types ¶
type Frame ¶ added in v1.13.2
type Frame struct { // Unique, package path-qualified name for the function of this call // frame. Function string // File and line number of our location in the frame. // // Note that the line number does not refer to where the function was // defined but where in the function the next call was made. File string Line int }
Frame holds information about a single frame in the call stack.
type Stack ¶ added in v1.13.2
type Stack []Frame
Stack is a stack of call frames.
Formatted with %v, the output is in a single-line, in the form,
foo/bar.Baz() (path/to/foo.go:42); bar/baz.Qux() (bar/baz/qux.go:12); ...
Formatted with %+v, the output is in the form,
foo/bar.Baz() path/to/foo.go:42 bar/baz.Qux() bar/baz/qux.go:12
func CallerStack ¶ added in v1.13.2
CallerStack returns the call stack for the calling function, up to depth frames deep, skipping the provided number of frames, not including Callers itself.
If zero, depth defaults to 8.
func (Stack) CallerName ¶ added in v1.13.2
CallerName returns the name of the first caller in this stack that isn't owned by the Fx library.
Click to show internal directories.
Click to hide internal directories.