1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-26 20:54:00 +02:00
echo/middleware/middleware.go
Vishal Rana 27f9b326b8 Ability to skip a middleware via callback
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-07-27 09:34:44 -07:00

15 lines
326 B
Go

package middleware
import "github.com/labstack/echo"
type (
// Skipper defines a function to skip middleware. Returning true skips processing
// the middleware.
Skipper func(c echo.Context) bool
)
// defaultSkipper returns false which processes the middleware.
func defaultSkipper(c echo.Context) bool {
return false
}