Profiling
A for-range over a channel that's never closed leaks the receiver. Why a fixed number of receives is safe, why a range isn't, and how to catch it with Go 1.27's leak profile.
Notes on Go's accepted goroutine leak profile and how it reuses the GC to find them.