Documentation ¶
Overview ¶
Package stacktrace has functionality for capturing and printing stack traces. It also has support for adding stack track capturing that is triggered when a Note is created.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct { // Location holds the physical location for this entry. Location Location // Location holds the logical location for this entry. Function Function }
Entry holds the human understandable form of a StackTrace entry.
type Function ¶
type Function struct { // Package is the go package the stack entry is from. Package string // Name is the function name the stack entry is from. Name string }
Function holds the logical location of a stack entry.
type Location ¶
type Location struct { // Directory is the directory the source file is from. Directory string // File is the filename of the source file. File string // Line is the line index in the file. Line int }
Location holds the physical location of a stack entry.
type Matcher ¶
Matcher is a predicate for stack entries.
func MatchFunction ¶
MatchFunction returns a predicate that matches the specified function.
func MatchPackage ¶
MatchPackage returns a predicate that matches the specified package.
type Source ¶
type Source func() []Entry
Source is the signature for something that returns a stacktrace.
func TrimBottom ¶
TrimBottom trims stack entries from the bottom of the trace. It trims from the first matching entry down to the end of the trace.