Documentation ¶
Index ¶
Constants ¶
const FrameSize = 3
FrameSize is the number of frames that FuncStack should trace back from.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FuncStack ¶
FuncStack wraps a function value and provides function frames containing the caller trace for debugging.
func NewFuncStack ¶
NewFuncStack creates a new FuncStack. The given frameSkip is added 2, meaning the first frame from 0 will start from the caller of NewFuncStack.
func NewIdleFuncStack ¶
NewIdleFuncStack works akin to NewFuncStack, but it also validates the given function type for the correct acceptable signatures for SourceFunc while also caching the checks.
func (*FuncStack) IsValid ¶
IsValid returns true if the given FuncStack is not a zero-value i.e. valid.
func (*FuncStack) TryRepanic ¶
func (fs *FuncStack) TryRepanic()
TryRepanic attempts to recover a panic. If successful, it will re-panic with the trace, or none if there is already one.
func (*FuncStack) ValidFrames ¶
ValidFrames returns non-zero frames.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry describes the local closure registry of each object.