What problem does it solve?
Prevents broken cancellation, missing deadlines, and incorrect context value handling by teaching idiomatic propagation of Go context.Context across API boundaries.
Core Features & Use Cases
- Request-lifecycle propagation: Ensures the same ctx flows from HTTP handlers through services and into databases and outbound HTTP calls.
- Cancellation, deadlines, and timeouts: Covers WithCancel, WithTimeout, WithDeadline, and correct cancel() handling to avoid leaks.
- Request-scoped values & tracing: Shows safe context value patterns using unexported key types and how to carry trace/correlation IDs across services.
- Background work correctness (Go 1.21+): Uses context.WithoutCancel for goroutines that must outlive the request while keeping context values.
Quick Start
Ask Claude to review a Go handler and service method for context propagation bugs (e.g., context.Background in handlers, missing defer cancel, improper context-aware DB/HTTP calls) and provide a corrected version with an explanation of each change.