Source code that will be used in a blog post.
- Go 1.23.1 or later - Download
- Optional: Task :
make
, but via yaml specificationsbrew install go-task
task timeout-demo
: Simple demonstration of a timeout on an API call.task timeout-with-cause-demo
: Adds in custom error for when a timeout occurs.task deadline-demo
: Based ontimeout-demo
, but shows we can use Deadline instead.task statuschecker-demo
: Demonstrates use of context cancel.task simplecontextvalue-demo
: Demonstrates simplistic context values.task contextvalue-demo
: Demonstrates using context values, with package keys, to set trace-ids in a webserver.task contextvalue-demo-curl
: To be used in connjuction withcontextvalue-demo
.task parentchildcancellation-demo
: Demonstrates using that cancellation only propogates down