context-pakken transporterer aflysningssignaler, deadlines og request-scoped værdier på tværs af API-grænseflade og goroutines. Det er standardmekanismen til at styre operationers levetid — især til at annullere arbejde og udbrede timeouts gennem en kæde af funktionskald.
Kerneproblem, som det løser
A request starts work across many goroutines/functions (DB query, API call, etc.).
If the client disconnects or a timeout hits, you want to CANCEL all that work
so goroutines don't keep running uselessly (wasting resources / leaking).
→ context propagates the "stop now" signal down the entire call chain.
