mirror of
https://github.com/labstack/echo.git
synced 2025-04-23 12:18:53 +02:00
Update echo.go
This commit is contained in:
parent
6016350b4c
commit
f867058e3b
2
echo.go
2
echo.go
@ -460,7 +460,7 @@ func static(i i, prefix, root string) *Route {
|
|||||||
return i.GET(prefix+"/*", h)
|
return i.GET(prefix+"/*", h)
|
||||||
}
|
}
|
||||||
|
|
||||||
// File registers a new route with path to serve a static file.
|
// File registers a new route with path to serve a static file with optional route-level middleware.
|
||||||
func (e *Echo) File(path, file string, m ...MiddlewareFunc) *Route {
|
func (e *Echo) File(path, file string, m ...MiddlewareFunc) *Route {
|
||||||
return e.GET(path, func(c Context) error {
|
return e.GET(path, func(c Context) error {
|
||||||
return c.File(file)
|
return c.File(file)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user