Documentation ¶
Overview ¶
Package gdebug contains facilities for programs to debug themselves while they are running.
Index ¶
- func Caller(skip ...int) (function string, path string, line int)
- func CallerDirectory() string
- func CallerFileLine() string
- func CallerFilePath() string
- func CallerFunction() string
- func CallerPackage() string
- func CallerWithFilter(filter string, skip ...int) (function string, path string, line int)
- func PrintStack(skip ...int)
- func Stack(skip ...int) string
- func StackWithFilter(filter string, skip ...int) string
- func StackWithFilters(filters []string, skip ...int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Caller ¶
CallerPath returns the function name and the absolute file path along with its line number of the caller.
func CallerDirectory ¶
func CallerDirectory() string
CallerDirectory returns the directory of the caller.
func CallerFileLine ¶
func CallerFileLine() string
CallerFileLine returns the file path along with the line number of the caller.
func CallerFilePath ¶
func CallerFilePath() string
CallerFilePath returns the file path of the caller.
func CallerFunction ¶
func CallerFunction() string
CallerFunction returns the function name of the caller.
func CallerPackage ¶
func CallerPackage() string
CallerPackage returns the package name of the caller.
func CallerWithFilter ¶
CallerPathWithFilter returns the function name and 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 ¶
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 ¶
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.
func StackWithFilters ¶
StackWithFilters 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 <filters> is a slice of strings, which are used to filter the path of the caller.
Types ¶
This section is empty.