1
0
mirror of https://github.com/labstack/echo.git synced 2024-11-28 08:38:39 +02:00

Middleware with options - 2

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2015-05-14 16:29:26 -07:00
parent f5a385b547
commit 4f45cd1517
2 changed files with 13 additions and 1 deletions

View File

@ -31,6 +31,16 @@ func main() {
return false
}))
//-------
// Slash
//-------
e.Use(mw.StripTrailingSlash())
// or
// e.Use(mw.RedirectToSlash())
// Routes
e.Get("/", hello)

View File

@ -163,7 +163,9 @@ h := func(*echo.Context) *HTTPError {
e.Get("/users/:id", h)
```
<!-- ## Middleware -->
## (Middleware)[https://github.com/labstack/echo/tree/master/examples/middleware]
*WIP*
## Response