#5
Apr 07
context.Context for Cancellation
The context package is how you propagate cancellation and deadlines through a goroutine tree. Every long-running function should accept a context.Context as its first parameter. When the context is cancelled, the function should stop and return. This is idiomatic Go.
By: dave_runtime
Apr 07, 2026 18:39