The problem I\'m seeing is that I\'m trying to use the http.FileServer with the Gorilla mux Router.Handle function.
This doesn\'t work (the image return
As of May 2015 gorilla/mux package still have no version releases. But problem is different now. It is not that myRouter.Handle does not match url and needs regexp, it does! But http.FileServer requires prefix to be removed from url. Below example works fine.
ui := http.FileServer(http.Dir("ui"))
myRouter.Handle("/ui/", http.StripPrefix("/ui/", ui))
Note, there is no /ui/{rest} in abowe example. You may also wrap http.FileServer into logger gorilla/handler and see request to coming to FileServer and response 404 going out.
ui := handlers.CombinedLoggingHandler(os.Stderr,http.FileServer(http.Dir("ui"))
myRouter.Handle("/ui/", ui) // getting 404
// works with strip: myRouter.Handle("/ui/", http.StripPrefix("/ui/", ui))