Using WrapH() internally.

This commit is contained in:
Manu Mtz-Almeida
2015-05-20 11:30:22 +02:00
parent 825737a78c
commit 138e4b49bf
2 changed files with 1 additions and 7 deletions
+1 -3
View File
@@ -123,9 +123,7 @@ func (group *RouterGroup) StaticFS(relativePath string, fs http.FileSystem) {
func (group *RouterGroup) createStaticHandler(relativePath string, fs http.FileSystem) func(*Context) {
absolutePath := group.calculateAbsolutePath(relativePath)
fileServer := http.StripPrefix(absolutePath, http.FileServer(fs))
return func(c *Context) {
fileServer.ServeHTTP(c.Writer, c.Request)
}
return WrapH(fileServer)
}
func (group *RouterGroup) combineHandlers(handlers HandlersChain) HandlersChain {