Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Stack ¶ added in v1.6.0
type Stack []uintptr
Stack is a captured call stack. Program counters are captured eagerly so they reflect the call site, but resolving them into file names, function names, and line numbers is deferred until Traces because it is comparatively expensive and most errors never have their traces inspected.
func CaptureStack ¶ added in v1.6.0
CaptureStack captures the current call stack with some deep frames skipped.
type Trace ¶
type Trace struct {
// Path is a full file path
Path string `json:"path"`
// Func is a function name
Func string `json:"func"`
// Line is a code line number
Line int `json:"line"`
}
Trace stores structured trace entry, including file line and path
type Traces ¶
type Traces []Trace
Traces is a list of trace entries
func CaptureTraces ¶
CaptureTraces gets the current stack trace with some deep frames skipped