uber-go/goleak

Goroutine leak detector

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 24 minutes ago
Added to GitGenius on September 12th, 2026
Created on November 2nd, 2017
Open Issues & Pull Requests: 24 (+0)
GitHub issues: Enabled
Number of forks: 176
Total Stargazers: 5,277 (+0)
Total Subscribers: 41 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 21.5 days
Mean response time: 170.2 days
90th percentile: 804.6 days
Tracked items: 5

Most active contributors

Sign in to see contributor activity.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 5
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 1,110 days
Stale 30+ days: 5
Stale 90+ days: 5

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • enhancement (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

goleak is a goroutine leak detector for Go that helps identify unexpected goroutines running after tests complete.

The tool addresses the problem of goroutine leaks, which occur when goroutines are inadvertently left running after test execution. goleak works by inspecting the set of running goroutines at the end of a test or test package and comparing it against a baseline to identify leaks. Developers can integrate it either by calling verification functions within individual tests or by using a TestMain function to check for leaks once after all tests in a package have finished running.

Teams should adopt goleak if they want automated detection of goroutine leaks during their test suite execution. It suits any Go project where goroutine management is important and leaks could accumulate over time. The tool is particularly valuable for long-running services where leaked goroutines might otherwise go unnoticed. One limitation to be aware of is that goleak cannot reliably distinguish between leaky goroutines and tests that have not yet finished when using t.Parallel, so the TestMain approach is recommended for parallel test suites.

The project maintains strict semantic versioning and has committed to no breaking changes to exported APIs before a major version bump. Development activity shows consistent attention to test coverage and build reliability, with active maintenance of compatibility across Go versions.