stacktrace

package
v1.1.49 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StackTrace

type StackTrace struct {
	File     string // The file name of the frame.
	Line     int    // The line number of the frame.
	Function string // The name of the function for the frame.
}

StackTrace represents a stack trace with file, line, and function name information.

func GetCaller

func GetCaller(skip int) StackTrace

GetCaller returns a StackTrace value representing the file, line, and function name for the caller of the function that calls GetCaller.

func (StackTrace) String

func (st StackTrace) String() string

type StackTraces

type StackTraces []StackTrace

StackTraces represents a slice of StackTrace values.

func GetStackTrace

func GetStackTrace() StackTraces

GetStackTrace returns a slice of StackTrace values representing the file, line, and function name for the stack trace.

func (StackTraces) String

func (st StackTraces) String() string

String formats each stack trace in the slice into a string, joined by newline characters.

Jump to

Keyboard shortcuts

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