{"id":13480991,"url":"https://github.com/uber-go/goleak","last_synced_at":"2026-10-18T23:48:53.245Z","repository":{"id":37334569,"uuid":"109330128","full_name":"uber-go/goleak","owner":"uber-go","description":"Goroutine leak detector","archived":false,"fork":false,"pushed_at":"2026-09-15T22:24:41.000Z","size":136,"stargazers_count":5296,"open_issues_count":26,"forks_count":179,"subscribers_count":41,"default_branch":"master","last_synced_at":"2026-10-17T08:14:53.028Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/uber-go.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"claude":null,"gemini":null,"cursor":null,"copilot":null,"dco":null,"cla":null,"disclosure":null}},"created_at":"2017-11-02T23:39:06.000Z","updated_at":"2026-10-16T15:55:30.000Z","dependencies_parsed_at":"2026-09-11T02:43:09.914Z","dependency_job_id":null,"html_url":"https://github.com/uber-go/goleak","commit_stats":{"total_commits":82,"total_committers":29,"mean_commits":"2.8275862068965516","dds":0.8048780487804879,"last_synced_commit":"79b1d32d401a900ee066087464f73049354eb5c0"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/uber-go/goleak","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uber-go%2Fgoleak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uber-go%2Fgoleak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uber-go%2Fgoleak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uber-go%2Fgoleak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uber-go","download_url":"https://codeload.github.com/uber-go/goleak/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uber-go%2Fgoleak/sbom","scorecard":{"id":906185,"data":{"date":"2025-08-11","repo":{"name":"github.com/uber-go/goleak","commit":"4ff5fa6529eed4e9aa192f44dae5e3dbc05902a8"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.9,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/ci.yml:11","Info: topLevel 'contents' permission set to 'read': .github/workflows/fossa.yaml:5","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/uber-go/goleak/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/uber-go/goleak/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/uber-go/goleak/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/uber-go/goleak/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/uber-go/goleak/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/uber-go/goleak/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/fossa.yaml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/uber-go/goleak/fossa.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/fossa.yaml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/uber-go/goleak/fossa.yaml/master?enable=pin","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T17:25:42.337Z","repository_id":37334569,"created_at":"2025-08-24T17:25:42.337Z","updated_at":"2025-08-24T17:25:42.337Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344872684,"owners_count":38333628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-17T02:00:06.547Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-07-31T17:00:47.380Z","updated_at":"2026-10-18T23:48:52.960Z","avatar_url":"https://github.com/uber-go.png","language":"Go","funding_links":[],"categories":["Misc","Go","开源类库","Open source library","Golang生态圈Dev\u0026Ops工具与服务","Language-Specific Tools","Testing and Quality","开发工具\u0026框架","Testing","Programming"],"sub_categories":["开发辅助包","Development Aid Package","Go","Testing","Advanced and Specialized Tools"],"readme":"# goleak [![GoDoc][doc-img]][doc] [![Build Status][ci-img]][ci] [![Coverage Status][cov-img]][cov]\n\nGoroutine leak detector to help avoid Goroutine leaks.\n\n## Installation\n\nYou can use `go get` to get the latest version:\n\n`go get -u go.uber.org/goleak`\n\n`goleak` also supports semver releases.\n\nNote that go-leak only [supports][release] the two most recent minor versions of Go.\n\n## Quick Start\n\nTo verify that there are no unexpected goroutines running at the end of a test:\n\n```go\nfunc TestA(t *testing.T) {\n\tdefer goleak.VerifyNone(t)\n\n\t// test logic here.\n}\n```\n\nInstead of checking for leaks at the end of every test, `goleak` can also be run\nat the end of every test package by creating a `TestMain` function for your\npackage:\n\n```go\nfunc TestMain(m *testing.M) {\n\tgoleak.VerifyTestMain(m)\n}\n```\n\n### Note\n\nFor tests that use [t.Parallel](https://pkg.go.dev/testing#T.Parallel), `goleak` does\nnot know how to distinguish a leaky goroutine from tests that have not finished running.\n\n\n```go\nfunc TestA(t *testing.T) {\n\ttt := struct{\n\t\tname  \t string\n\t\tinput \t SomeType\n\t\texpected string\n\t}{\n\t\t// ...\n\t}\n\n\tfor _, t := range tt {\n\t\tt.Run(t.name, func(t *testing.T) {\n\t\t\tt.Parallel() // \u003c- goleak gets confused here!\n\n\t\t\t// ...\n\t\t}\n\t}\n}\n```\nFor such cases you should also defer to using `goleak.VerifyTestMain` as shown above.\n\n## Determine Source of Package Leaks\n\nWhen verifying leaks using `TestMain`, the leak test is only run once after all tests\nhave been run. This is typically enough to ensure there's no goroutines leaked from\ntests, but when there are leaks, it's hard to determine which test is causing them.\n\nYou can use the following bash script to determine the source of the failing test:\n\n```sh\n# Create a test binary which will be used to run each test individually\n$ go test -c -o tests\n\n# Run each test individually, printing \".\" for successful tests, or the test name\n# for failing tests.\n$ for test in $(go test -list . | grep -E \"^(Test|Example)\"); do ./tests -test.run \"^$test\\$\" \u0026\u003e/dev/null \u0026\u0026 echo -n \".\" || echo -e \"\\n$test failed\"; done\n```\n\nThis will only print names of failing tests which can be investigated individually. E.g.,\n\n```\n.....\nTestLeakyTest failed\n.......\n```\n\n## Stability\n\ngoleak is v1 and follows [SemVer](http://semver.org/) strictly.\n\nNo breaking changes will be made to exported APIs before 2.0.\n\n[doc-img]: https://pkg.go.dev/badge/go.uber.org/goleak.svg\n[doc]: https://pkg.go.dev/go.uber.org/goleak\n[ci-img]: https://github.com/uber-go/goleak/actions/workflows/ci.yml/badge.svg\n[ci]: https://github.com/uber-go/goleak/actions/workflows/ci.yml\n[cov-img]: https://codecov.io/gh/uber-go/goleak/branch/master/graph/badge.svg\n[cov]: https://codecov.io/gh/uber-go/goleak\n[release]: https://go.dev/doc/devel/release#policy\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuber-go%2Fgoleak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuber-go%2Fgoleak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuber-go%2Fgoleak/lists"}