Skip to content

Instantly share code, notes, and snippets.

@fallenhitokiri
Last active September 24, 2017 11:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fallenhitokiri/2dd1e690bd39c18bb3e2 to your computer and use it in GitHub Desktop.
Save fallenhitokiri/2dd1e690bd39c18bb3e2 to your computer and use it in GitHub Desktop.
using go.rice and gorilla mix together
router := mux.NewRouter()
box := rice.MustFindBox("static")
staticFileServer := http.StripPrefix("/static/", http.FileServer(box.HTTPBox()))
router.Handle("/static/{path:.*}", loggingHandler(staticFileServer))
@ara-balaki
Copy link

can you explain the loggingHandler function?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment