1
0
mirror of https://github.com/labstack/echo.git synced 2025-07-15 01:34:53 +02:00

fixed recipes for static middleware change

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2016-10-22 16:19:21 -07:00
parent 166a24fe23
commit 4760f4cedf
8 changed files with 13 additions and 10 deletions

View File

@ -16,7 +16,7 @@ type (
Skipper Skipper
// Prefix to strip from the request URL path.
// Required.
// Optional. Default value "".
Prefix string `json:"root"`
// Root directory from where the static content is served.
@ -48,9 +48,8 @@ var (
// Static returns a Static middleware to serves static content from the provided
// root directory.
func Static(prefix, root string) echo.MiddlewareFunc {
func Static(root string) echo.MiddlewareFunc {
c := DefaultStaticConfig
c.Prefix = prefix
c.Root = root
return StaticWithConfig(c)
}