context.Context in Go: Timeouts and Cancellation
A context.Context carries a cancellation signal and an optional deadline through a chain of function calls. When a user closes the browser tab, every database query and HTTP call made for that request can stop. Every request already has one func handleSearch(w...