Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FilePath string // used for testing
FilePath is the full path to this source file.
This is meant to be used for internal sawmill testing only.
View Source
var RepoPath string
RepoPath is the path to the top of the sawmill repo.
This is meant to be used for internal sawmill testing only.
The value is used when obtaining a stack trace to determine where the trace should start. The first frame not in RepoPath is considered to be the top.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type StackFrame ¶
type StackFrame struct { PC uintptr File string Line int Function string Func string Package string }
StackFrame describes an entry in a call stack.
func (*StackFrame) Source ¶
func (sf *StackFrame) Source() []byte
Source returns the source code line of the stack frame. If the source cannot be read for any reason, nil is returned.
func (*StackFrame) SourceContext ¶
func (sf *StackFrame) SourceContext(beforeCount int, afterCount int) (linesBefore [][]byte, line []byte, linesAfter [][]byte)
SourceContext retuns the source code lines surrounding the stack frame.
Click to show internal directories.
Click to hide internal directories.