stacktrace

package
v0.0.0-...-7426b64 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FrameCap = 20

FrameCap is a default cap for frames array. It can be changed to number of expected frames for purpose of performance optimisation.

Functions

This section is empty.

Types

type Frame

type Frame struct {
	// Func contains a function name.
	Func string
	// Line contains a line number.
	Line int
	// Path contains a file path.
	Path string
	// Package is the package name for this frame
	Package string
}

Frame is a single frame in a stacktrace

type Stacktrace

type Stacktrace struct {
	Frames []Frame
}

Stacktrace represents a stacktrace

func Get

func Get() *Stacktrace

Get returns a stacktrace

func GetWithSkip

func GetWithSkip(skipFiles []string) *Stacktrace

func (*Stacktrace) String

func (t *Stacktrace) String() string

String returns a string representation of a stacktrace For example:

./package/file.go:123:file.func
./another/package.go:456:package.(*Struct).method
<go>/src/runtime.s:789:runtime.func

Jump to

Keyboard shortcuts

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