Blog112K views2,246 votes0 replies4,289 following
Go 1.22's net/http ServeMux: Method and Wildcard Routing Without Extra Dependencies
Go 1.22 adds method and wildcard routing to net/http's ServeMux, letting you drop chi or gorilla/mux for many services. This post shows the new patterns, PathValue extraction, precedence rules, and a zero‑dependency CRUD example.