callstack

package
v21.11.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecorateWith

func DecorateWith(prefix, what, why string, ignoreCount uint) string

DecorateWith adds call trace to the message "prefix what: why" 'ignoreCount' indicates the number of call that have to be ignored at the beginning of the stack trace

func IgnoreTraceUntil

func IgnoreTraceUntil(callTrace interface{}, search string, stop Occurrence) string

IgnoreTraceUntil cuts all the lines of the trace before and including lines with 'search' in it if 'stop' contains FirstOccurrence, cuts until the first occurrence of line containing 'search' if 'stop' contains LastOccurrence, cuts until the last occurrence of line containing 'search'

func SourceFilePathUpdater

func SourceFilePathUpdater() func(string) string

SourceFilePathUpdater returns a function to alter source file path, if debug is not enabled

Types

type Occurrence

type Occurrence bool

Occurrence defines at what occurrence of search IgnoreTraceUntil() will stop

const (
	FirstOccurrence Occurrence = false

	LastOccurrence Occurrence = true
)

Jump to

Keyboard shortcuts

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