Last Updated: May 22, 2026
Go 1.22 upgraded the standard library's http.ServeMux so it can route by HTTP method and extract path parameters without any third-party packages. Before this change, the built-in router only matched on path prefixes, which is why most Go web apps reached for chi, gorilla/mux, or gin just to handle basic REST routes. This lesson covers the new pattern syntax, how wildcards work, and how to build a small product and order API using nothing but net/http.