Go · Concepts
Go context, fully explainedcancellation, time budgets, and four pitfalls
I was already taking ctx as the first argument and passing it along. What I had never checked was whether canceling actually stops the goroutine. After stalling on that question in an interview, I went back to context from the start.