6 ms·
Most of the time you accept a context because some downstream function requires it (i.e. I'm writing an HTTP client, and the `net/http` std lib functions requir
by badrequest 3y ago
Most of the time you accept a context because some downstream function requires it (i.e. I'm writing an HTTP client, and the `net/http` std lib functions require context for some part of it). You can have general confidence that the standard library will respect things like context deadlines, even if the wrappers that invoke that don't necessarily.