Black Friday Sale!
Save 50% on Web Development with Go and Test with Go until Dec 3.
Both courses have lifetime access, a 30-day money back guarantee, and free updates. This is also the biggest discount I offer on the courses, and I only do it once a year around Black Friday.
Thank you for your continued support and happy coding!
Jon Calhoun
In Go 1.22 the ServeMux was updated to be significantly easier to use for building web applications. Supported was added for HTTP methods, variables in URL paths, and more. In this article we discuss how it stacks up to some third party libraries that have existed in the Go ecosystemf or a while.
This article covers how to use the http.ServeMux provided by Go's standard libary in order to apply middleware to specific path prefixes (eg /dashboard/*) while ensuring the middleware isn't run on other paths.
Jon Calhoun is a full stack web developer who teaches about Go, web development, algorithms, and anything programming. If you haven't already, you should totally check out his Go courses.
Previously, Jon worked at several statups including co-founding EasyPost, a shipping API used by several fortune 500 companies. Prior to that Jon worked at Google, competed at world finals in programming competitions, and has been programming since he was a child.
©2018 Jonathan Calhoun. All rights reserved.