TL;DR
- Using context to cancel and timeout, deadline for expensive operation.
- Using context to carry information, such as request ID in logging chain.
- The http package won’t carry user customized context value b/w client and server.
Resource
- The context.Background() is used as root context.
- The code examples captured from the lecture.