stack

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2021 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package stack provides helpers for querying the callstack.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExternalCaller

func ExternalCaller() *runtime.Frame

ExternalCaller returns the first frame outside the callers package.

func Frames

func Frames(skip, max int) []runtime.Frame

Frames returns at most max callstack Frames, starting with its caller and skipping skip Frames.

func Main

func Main() *runtime.Frame

Main returns the main() function Frame.

func Match

func Match(skip int, predicate func(runtime.Frame) bool) *runtime.Frame

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL