Serving static files over HTTP using Gorilla Mux

In the previous recipe, we served static resources through Go's HTTP file server. In this recipe, we will look at how we can serve it through the Gorilla Mux router, which is also one of the most common ways of creating an HTTP router.

Get Go Web Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.