We break down the basic mental model of HTTP in Go: how the server from
net/http passes a request to
http.ServeMux, how the
http.Handler contract is defined via the
ServeHTTP method, why the
http.HandlerFunc adapter is needed, and how
Handle and
HandleFunc differ. At the end, we assemble a mini “task tracker” scaffold and pin down common mistakes (404/405, writing to stdout instead of
http.ResponseWriter, confusion between routing and handling).