diff options
Diffstat (limited to 'vendor/github.com/labstack/echo/middleware/middleware.go')
-rw-r--r-- | vendor/github.com/labstack/echo/middleware/middleware.go | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/vendor/github.com/labstack/echo/middleware/middleware.go b/vendor/github.com/labstack/echo/middleware/middleware.go deleted file mode 100644 index 71f95db7..00000000 --- a/vendor/github.com/labstack/echo/middleware/middleware.go +++ /dev/null @@ -1,35 +0,0 @@ -package middleware - -import ( - "regexp" - "strconv" - "strings" - - "github.com/labstack/echo" -) - -type ( - // Skipper defines a function to skip middleware. Returning true skips processing - // the middleware. - Skipper func(c echo.Context) bool -) - -func captureTokens(pattern *regexp.Regexp, input string) *strings.Replacer { - groups := pattern.FindAllStringSubmatch(input, -1) - if groups == nil { - return nil - } - values := groups[0][1:] - replace := make([]string, 2*len(values)) - for i, v := range values { - j := 2 * i - replace[j] = "$" + strconv.Itoa(i+1) - replace[j+1] = v - } - return strings.NewReplacer(replace...) -} - -// DefaultSkipper returns false which processes the middleware. -func DefaultSkipper(echo.Context) bool { - return false -} |