package stack
import "github.com/mmcloughlin/avo/internal/stack"
Package stack provides helpers for querying the callstack.
Index ¶
- func ExternalCaller() *runtime.Frame
- func Frames(skip, max int) []runtime.Frame
- func Main() *runtime.Frame
- func Match(skip int, predicate func(runtime.Frame) bool) *runtime.Frame
Functions ¶
func ExternalCaller ¶
ExternalCaller returns the first frame outside the callers package.
func Frames ¶
Frames returns at most max callstack Frames, starting with its caller and skipping skip Frames.
func Main ¶
Main returns the main() function Frame.
func Match ¶
Match returns the first stack frame for which the predicate function returns true. Returns nil if no match is found. Starts matching after skip frames, starting with its caller.
Source Files ¶
- Version
- v0.6.0 (latest)
- Published
- Jan 7, 2024
- Platform
- windows/amd64
- Imports
- 3 packages
- Last checked
- 1 month ago –
Tools for package owners.