Loading…
0+ curated questions with the same answer shape every time: quick recap, deep dive, pitfalls, and follow-ups. Coverage includes .
Go's net/http standard library is powerful enough to run production services without a framework — and interviewers at companies like Google, Stripe, and Cloudflare often test whether you know it deeply. This module covers the http.Handler interface and http.HandlerFunc type (the adapter pattern that makes any function an HTTP handler), http.ServeMux routing (the 1.22+ enhanced routing with methods and wildcards vs third-party routers), the middleware pattern using handler wrapping (logging, authentication, request ID injection), the request lifecycle (how to read body, query params, headers safely), the http.Client and its critical configuration (Transport, connection pooling, idle connection timeout — the production pitfall of creating a new client per request), and how to set read/write/idle timeouts on the server to prevent goroutine leaks from slow clients. These topics come up in every Go web interview as a baseline before discussing frameworks.
Full catalog
Topics are ordered for learning. Within each topic, rows are numbered 1–0 globally so you always know where you are. Collapse topics if you want a lighter view — use Expand all when you need the full list again.
Numbers 1–0 follow the order we recommend — click any row to open the full answer, or use the sticky Next link at the bottom of each page to go Q1 → Q0.