calliter

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFrameIter

func NewFrameIter(initialPCBufSize, skip int) iter.Seq[runtime.Frame]

NewFrameIter returns an iterator over the current goroutine's call stack.

The returned iterator conforms to the standard library's iter.Seq type and can be used with a range loop:

iter := NewFrameIter(16, 0)
for frame := range iter {
	// use frame
}

initialPCBufSize controls the initial size of the []uintptr buffer passed to runtime.Callers. If the buffer is too small to hold the complete call stack, the implementation will grow it until the full stack has been captured.

The skip parameter has the same meaning as the skip parameter passed directly to runtime.Callers.

Types

This section is empty.

Jump to

Keyboard shortcuts

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