I got an occasion to do a deep dive into net/http recently, and wrote a post about all the different timeouts you can set on the client and server side. How they work, how they interact and how to use them.

Server timeouts

Client timeouts

The complete guide to Go net/http timeouts | CloudFlare Blog (archive)