Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Frame ¶
type Frame struct {
// contains filtered or unexported fields
}
Frame is a stack of frame.
func (Frame) Format ¶
Format implements fmt.Formatter.
The verb means as follows.
verb description example s file name a.go s+ file path example.com/sample/a/a.go d line number 10 n function name F.G.func1 P package name a P+ import path example.com/sample/a v file:line a.go:10
func (Frame) FuncName ¶
FuncName returns function name without package path. e.g., example.com/sample/a.F.G.func1 -> F.G.func1
func (Frame) PkgName ¶
PkgName returns the package name of the function. e.g., example.com/sample/a.F.G.func1 -> a
func (Frame) PkgPath ¶
PkgPath returns the package (import path) of the function. e.g., example.com/sample/a.F.G.func1 -> example.com/sample/a
func (Frame) RuntimeFrame ¶
RuntimeFrame returns runtime.Frame.
type StackTrace ¶
type StackTrace []Frame
StackTrace is stack of Frames.
func New ¶
func New(skip int) StackTrace
New creates callers of StackTrace. The argument skip is the number of stack frames to skip before recording, with 0 identifying the frame for New itself and 1 identifying the caller of New. It mean that New calls runtime.Callers with 2+skip as the first argument.
func (StackTrace) Format ¶
func (st StackTrace) Format(s fmt.State, verb rune)
Format implements fmt.Formatter.