Last active
September 24, 2017 11:18
-
-
Save fallenhitokiri/2dd1e690bd39c18bb3e2 to your computer and use it in GitHub Desktop.
using go.rice and gorilla mix together
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
router := mux.NewRouter() | |
box := rice.MustFindBox("static") | |
staticFileServer := http.StripPrefix("/static/", http.FileServer(box.HTTPBox())) | |
router.Handle("/static/{path:.*}", loggingHandler(staticFileServer)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
can you explain the loggingHandler function?