More benchmarks

This commit is contained in:
Manu Mtz-Almeida
2015-05-31 15:55:10 +02:00
parent 43bcac2031
commit aa9078bc73
2 changed files with 22 additions and 7 deletions
+3 -3
View File
@@ -127,11 +127,11 @@ func (group *RouterGroup) StaticFS(relativePath string, fs http.FileSystem) {
panic("URL parameters can not be used when serving a static folder")
}
handler := group.createStaticHandler(relativePath, fs)
relativePath = path.Join(relativePath, "/*filepath")
urlPattern := path.Join(relativePath, "/*filepath")
// Register GET and HEAD handlers
group.GET(relativePath, handler)
group.HEAD(relativePath, handler)
group.GET(urlPattern, handler)
group.HEAD(urlPattern, handler)
}
func (group *RouterGroup) createStaticHandler(relativePath string, fs http.FileSystem) HandlerFunc {