Go Web Development Cookbook
上QQ阅读APP看书,第一时间看更新

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.