debug

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package debug contains facilities for programs to debug themselves while they are running.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Caller

func Caller(skip ...int) string

CallerPath returns the absolute file path along with its line number of the caller.

func CallerWithFilter

func CallerWithFilter(filter string, skip ...int) string

CallerPathWithFilter returns the absolute file path along with its line number of the caller.

The parameter <filter> is used to filter the path of the caller.

func PrintStack

func PrintStack(skip ...int)

PrintStack prints to standard error the stack trace returned by runtime.Stack.

func Stack

func Stack(skip ...int) string

Stack returns a formatted stack trace of the goroutine that calls it. It calls runtime.Stack with a large enough buffer to capture the entire trace.

func StackWithFilter

func StackWithFilter(filter string, skip ...int) string

StackWithFilter returns a formatted stack trace of the goroutine that calls it. It calls runtime.Stack with a large enough buffer to capture the entire trace.

The parameter <filter> is used to filter the path of the caller.

Types

This section is empty.

Jump to

Keyboard shortcuts

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