1
What canceled my Go context?
How Go 1.20's WithCancelCause and Go 1.21's WithTimeoutCause let you attach a reason to context cancellation, plus a gotcha with manual cancel and the stdlib pattern that covers every path.
Software engineering blog by Redowan Delowar covering platform engineering, backend systems, distributed systems, reliability, databases, Go, Python, TypeScript, and pragmatic engineering practice.
Visit rednafi.com → RSS feedOn Hacker News Nov 2023 – Jun 2026
Software Engineering 5Web & Frontend 1Tools & Productivity 1Life, Learning & Writing 1Programming Languages 1Infrastructure & DevOps 1
How Go 1.20's WithCancelCause and Go 1.21's WithTimeoutCause let you attach a reason to context cancellation, plus a gotcha with manual cancel and the stdlib pattern that covers every path.