{"id":13396839,"url":"https://github.com/go-stack/stack","last_synced_at":"2025-03-13T23:31:48.030Z","repository":{"id":22609119,"uuid":"25951358","full_name":"go-stack/stack","owner":"go-stack","description":"Package stack implements utilities to capture, manipulate, and format call stacks.","archived":false,"fork":false,"pushed_at":"2021-08-18T18:48:25.000Z","size":1174,"stargazers_count":397,"open_issues_count":4,"forks_count":35,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-10T01:56:46.111Z","etag":null,"topics":["go","golang","stacktrace"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/go-stack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-30T02:31:57.000Z","updated_at":"2025-02-19T18:29:45.000Z","dependencies_parsed_at":"2022-08-07T10:15:58.564Z","dependency_job_id":null,"html_url":"https://github.com/go-stack/stack","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-stack%2Fstack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-stack%2Fstack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-stack%2Fstack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-stack%2Fstack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-stack","download_url":"https://codeload.github.com/go-stack/stack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243500196,"owners_count":20300757,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","stacktrace"],"created_at":"2024-07-30T18:01:04.168Z","updated_at":"2025-03-13T23:31:47.694Z","avatar_url":"https://github.com/go-stack.png","language":"Go","readme":"[![GoDoc](https://godoc.org/github.com/go-stack/stack?status.svg)](https://godoc.org/github.com/go-stack/stack)\n[![Go Report Card](https://goreportcard.com/badge/go-stack/stack)](https://goreportcard.com/report/go-stack/stack)\n[![TravisCI](https://travis-ci.org/go-stack/stack.svg?branch=master)](https://travis-ci.org/go-stack/stack)\n[![Coverage Status](https://coveralls.io/repos/github/go-stack/stack/badge.svg?branch=master)](https://coveralls.io/github/go-stack/stack?branch=master)\n\n# stack\n\nPackage stack implements utilities to capture, manipulate, and format call\nstacks. It provides a simpler API than package runtime.\n\nThe implementation takes care of the minutia and special cases of interpreting\nthe program counter (pc) values returned by runtime.Callers.\n\n## Versioning\n\nPackage stack publishes releases via [semver](http://semver.org/) compatible Git\ntags prefixed with a single 'v'. The master branch always contains the latest\nrelease. The develop branch contains unreleased commits.\n\n## Formatting\n\nPackage stack's types implement fmt.Formatter, which provides a simple and\nflexible way to declaratively configure formatting when used with logging or\nerror tracking packages.\n\n```go\nfunc DoTheThing() {\n    c := stack.Caller(0)\n    log.Print(c)          // \"source.go:10\"\n    log.Printf(\"%+v\", c)  // \"pkg/path/source.go:10\"\n    log.Printf(\"%n\", c)   // \"DoTheThing\"\n\n    s := stack.Trace().TrimRuntime()\n    log.Print(s)          // \"[source.go:15 caller.go:42 main.go:14]\"\n}\n```\n\nSee the docs for all of the supported formatting options.\n","funding_links":[],"categories":["Library","开源类库","Open source library"],"sub_categories":["调试","Debugging"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-stack%2Fstack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-stack%2Fstack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-stack%2Fstack/lists"}