debugging

package
v0.0.0-...-1f00af5 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package debugging contains useful methods for debugging the app, safely isolated from the rest of the app's packages.

Index

Constants

This section is empty.

Variables

View Source
var (
	// StackDepth is the depth that Callers() will crawl up the call stack. This
	// variable is configurable.
	StackDepth = 20

	// StopAt is the function name to stop the tracebacks at. Set to a blank
	// string to not stop and trace all the way up to `runtime.goexit` or
	// wherever.
	StopAt = "main.main"
)

Configurable variables for the stack tracer functions.

Functions

func Caller

func Caller() string

Caller returns the filename and line number that called the calling function.

func Callers

func Callers() []string

Callers returns an array of all the callers of the current function.

func Pause

func Pause()

Pause until the user hits enter in the console.

func PrintCallers

func PrintCallers()

PrintCallers prints the stringified callers directly to STDOUT.

func StringifyCallers

func StringifyCallers() string

StringifyCallers pretty-prints the Callers as a single string with newlines.

Types

This section is empty.

Jump to

Keyboard shortcuts

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