The Go standard library gives you a capable HTTP stack before you install a single dependency.
Why Start with ServeMux
http.ServeMux is boring in the best way: it is stable, well understood, and easy to deploy anywhere Go runs.
func main() {
mux := http.NewServeMux()
mux.HandleFunc("GET /healthz", health)
mux.HandleFunc("GET /users/{id}", getUser)
http.ListenAndServe(":8080", mux)
}
Route Shape
Keep route patterns close to resource boundaries. Use nouns for resources and reserve verbs for actions that cannot be modeled cleanly.
What Comes Next
Once routes are clear, middleware becomes easier to compose and test.