Frame holds information about a single frame in the call stack. 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. Unique, package path-qualified name for the function of this call
frame.Lineint( Frame) String() string
Frame : expvar.Var
Frame : fmt.Stringer
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 CallerName returns the name of the first caller in this stack that isn't
owned by the Fx library. Format implements fmt.Formatter to handle "%+v". String returns a single-line, semi-colon representation of a Stack.
For a list of strings where each represents one frame, use Strings.
For a cleaner multi-line representation, use %+v. Strings returns a list of strings, each representing a frame in the stack.
Each line will be in the form,
foo/bar.Baz() (path/to/foo.go:42)
Stack : expvar.Var
Stack : fmt.Formatter
Stack : fmt.Stringer
func CallerStack(skip, depth int) Stack
Package-Level Functions (total 3)
Caller returns the formatted calling func name
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.
FuncName returns a funcs formatted name
The pages are generated with Goldsv0.8.2. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.