context
what is context
one request = one goroutine, and other related goroutines must be coordinated by it.
includes request data, like auth, token
cancel signal
timeout
Best practice
pass as 1st param
don't assign nil, then the tracking is broken.
thread safe, so one ctx can be passed to multiple goroutines.
Last updated
Was this helpful?