debug

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BKDR

func BKDR(str []byte) uint32

BKDR calculates a hash value using the BKDR hash algorithm.

func BinVersion

func BinVersion() (string, error)

BinVersion returns the version of the current running binary.

func BinVersionMd5

func BinVersionMd5() (string, error)

BinVersionMd5 returns the MD5 hash of the current running binary.

func Caller

func Caller(skip ...int) (function string, path string, line int, err error)

Caller returns the function name, absolute file path, and 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 CallerFileLineShort

func CallerFileLineShort() string

CallerFileLineShort returns the file name 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

func CallerWithFilter(filters []string, skip ...int) (function string, path string, line int, err error)

CallerWithFilter returns the caller information with path filtering.

func FuncName

func FuncName(f interface{}) string

FuncName returns the function name of given `f`.

func FuncPath

func FuncPath(f interface{}) string

FuncPath returns the complete function path of given `f`.

func GoroutineId

func GoroutineId() (int, error)

GoroutineId retrieves and returns the current goroutine id from stack information. Note: This function has low performance due to its use of runtime.Stack. It is primarily intended for debugging purposes.

func PrintStack

func PrintStack(skip ...int)

PrintStack prints the stack trace to standard error.

func SetStackFilterKey

func SetStackFilterKey(key string)

SetStackFilterKey sets the stack filter key used for filtering debug information.

func Stack

func Stack(skip ...int) string

Stack returns a formatted stack trace of the calling goroutine.

func StackWithFilter

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

StackWithFilter returns a formatted stack trace with a single filter.

func StackWithFilters

func StackWithFilters(filters []string, skip ...int) string

StackWithFilters returns a formatted stack trace with multiple filters.

Types

This section is empty.

Jump to

Keyboard shortcuts

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