Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultDepth = 64
Variables ¶
This section is empty.
Functions ¶
func WriteFrameToBuffer ¶
WriteFrameToBuffer writes a string representation of the given runtime.Frame to the provided strings.Builder.
The format is:
FunctionName FilePath:LineNumber
Types ¶
type Stack ¶
type Stack struct {
// contains filtered or unexported fields
}
func Capture ¶
Capture captures the current stack trace, skipping the specified number of frames and limiting the depth of the trace. If depth is math.MaxInt, it captures the full trace.
func (*Stack) AddCaller ¶
func (s *Stack) AddCaller()
AddCaller adds the caller's frame to the stack.
func (*Stack) FramesIter ¶
FramesIter returns an iterator over the frames in the stack.
The iterator yields the frames starting from uppermost (the one added last).
Click to show internal directories.
Click to hide internal directories.