codelocation

package
v2.0.0-...-642e908 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PruneStack

func PruneStack(fullStackTrace string, skip int) string

PruneStack removes references to functions that are internal to Ginkgo and the Go runtime from a stack string and a certain number of stack entries at the beginning of the stack. The stack string has the format as returned by runtime/debug.Stack. The leading goroutine information is optional and always removed if present. Beware that runtime/debug.Stack adds itself as first entry, so typically skip must be >= 1 to remove that entry.

Types

type CodeLocation

type CodeLocation struct {
	FileName       string `json:"file_name"`
	LineNumber     int    `json:"line_number"`
	FullStackTrace string `json:"full_stack_trace"`
}

func New

func New(skip int) CodeLocation

func (CodeLocation) String

func (codeLocation CodeLocation) String() string

Jump to

Keyboard shortcuts

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