Documentation
¶
Overview ¶
Package stacko provides the ability to generate a structured stacktrace.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextInfo ¶
ContextInfo takes a path and a line number and returns a slice of strings that represent the line in self, the preceding and the proceding lines. It also returns the offset for the actual line in the context.
func FunctionInfo ¶
FunctionInfo takes a program counter and returns the function and package name for the frame at that counter.
Types ¶
type Frame ¶
type Frame struct {
FileName string
FunctionName string
PackageName string
Path string
LineNumber int
InDomain bool
PreContext []string
PostContext []string
Context string
}
The Frame type is a struct that hold a structured stacktrace frame.
type Stacktrace ¶
type Stacktrace []Frame
The Stacktrace type is a slice of frames.
func NewStacktrace ¶
func NewStacktrace(skip int) (Stacktrace, error)
NewStacktrace generates a complete stacktrace except for those initial skip frames that are skipped.
Click to show internal directories.
Click to hide internal directories.