Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Package stack implements utilities to capture, manipulate, and format call stacks.

License

NotificationsYou must be signed in to change notification settings

go-stack/stack

Repository files navigation

GoDocGo Report CardTravisCICoverage Status

stack

Package stack implements utilities to capture, manipulate, and format callstacks. It provides a simpler API than package runtime.

The implementation takes care of the minutia and special cases of interpretingthe program counter (pc) values returned by runtime.Callers.

Versioning

Package stack publishes releases viasemver compatible Gittags prefixed with a single 'v'. The master branch always contains the latestrelease. The develop branch contains unreleased commits.

Formatting

Package stack's types implement fmt.Formatter, which provides a simple andflexible way to declaratively configure formatting when used with logging orerror tracking packages.

funcDoTheThing() {c:=stack.Caller(0)log.Print(c)// "source.go:10"log.Printf("%+v",c)// "pkg/path/source.go:10"log.Printf("%n",c)// "DoTheThing"s:=stack.Trace().TrimRuntime()log.Print(s)// "[source.go:15 caller.go:42 main.go:14]"}

See the docs for all of the supported formatting options.

About

Package stack implements utilities to capture, manipulate, and format call stacks.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp