{"modulePath":"github.com/LightArrayCapital/go-utilities/logger","version":"v0.0.0-20251129084319-1a4fc35e40b9","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package stacktrace\n\n## Types\n\n```go\ntype ErrorStackTrace struct {\n\tCause      error\n\tStackTrace *StackTrace\n}\n```\nErrorStackTrace is a pair of an error and its stack trace.\n\n```go\nfunc (s ErrorStackTrace) Error() string\n```\n\n```go\nfunc (s ErrorStackTrace) Format(f fmt.State, verb rune)\n```\nnolint: errcheck\n\n```go\nfunc (s ErrorStackTrace) String() string\n```\n\n```go\ntype ErrorStackTraces []ErrorStackTrace\n```\nErrorStackTraces is a list of error stack traces.\n\n```go\nfunc ExtractErrorStackTraces(err error) ErrorStackTraces\n```\nExtractErrorStackTraces extracts the stack traces from the provided error and its causes. Sorted from oldest to newest.\n\n```go\nfunc (s ErrorStackTraces) Format(f fmt.State, verb rune)\n```\nnolint: errcheck\n\n```go\nfunc (s ErrorStackTraces) String() string\n```\n\n```go\ntype Frame struct {\n\truntime.Frame\n}\n```\n\n```go\nfunc (f Frame) Format(fs fmt.State, verb rune)\n```\nnolint: errcheck\n\n```go\nfunc (f Frame) String() string\n```\n\n```go\ntype StackTrace struct {\n\tPCS    []uintptr\n\tFrames []Frame\n}\n```\nStackTrace is the type of the data for a call stack. This mirrors the type of the same name in [github.com/cockroachdb/errors/errbase.StackTrace](/github.com/cockroachdb/errors/errbase#StackTrace).\n\n```go\nfunc Caller(skip int) *StackTrace\n```\nCaller captures a stack trace of the specified depth, skipping the provided number of frames. skip=0 identifies the caller of Caller.\n\nAlias of [Capture](#Capture)\n\n```go\nfunc Capture(skip int) *StackTrace\n```\nCapture captures a stack trace of the specified depth, skipping the provided number of frames. skip=0 identifies the caller of Capture.\n\n```go\nfunc ParsePCS(pcs []uintptr) *StackTrace\n```\n\n```go\nfunc (s *StackTrace) Count() int\n```\nCount reports the total number of frames in this stacktrace.\n\n```go\nfunc (s *StackTrace) Format(fs fmt.State, verb rune)\n```\nFormat formats the stack of Frames according to the fmt.Formatter interface.\n\n```go\nfunc (s *StackTrace) FramesStrings() []string\n```\nFramesStrings returns the frames of this stacktrace as slice of strings.\n\n```go\nfunc (s *StackTrace) String() string\n```\nString returns a string representation of the stack trace.\n\n","path":"github.com/LightArrayCapital/go-utilities/logger/stacktrace","name":"stacktrace","synopsis":"","isRedistributable":true}
