Articles tagged with ‘context’
RSS-
Should you store *that value* in a Go context?
Not every value should be stored in a Go context, this article examines why.
Sun 12 Nov, 2023Read now -
Add value to a context in a type safe way
Don't litter your code base with keys and/or type assertions. Add and get values from contexts in a type safe way.
Sun 12 Nov, 2023Read now -
Choosing between context.Background() and context.TODO()
Some guidance on choosing the right constructor for your context (and one thing you should never do).
Fri 14 Apr, 2023Read now -
Context cancellation: Stop wasting resources on aborted requests
How to handle and send "cancellation signals" using the context package in the standard library.
Thu 23 Mar, 2023Read now