diff options
Diffstat (limited to 'src/dma/vendor/github.com/labstack/echo/group.go')
-rw-r--r-- | src/dma/vendor/github.com/labstack/echo/group.go | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/dma/vendor/github.com/labstack/echo/group.go b/src/dma/vendor/github.com/labstack/echo/group.go index 5257e83c..3e3732b6 100644 --- a/src/dma/vendor/github.com/labstack/echo/group.go +++ b/src/dma/vendor/github.com/labstack/echo/group.go @@ -1,6 +1,7 @@ package echo import ( + "net/http" "path" ) @@ -29,47 +30,47 @@ func (g *Group) Use(middleware ...MiddlewareFunc) { // CONNECT implements `Echo#CONNECT()` for sub-routes within the Group. func (g *Group) CONNECT(path string, h HandlerFunc, m ...MiddlewareFunc) *Route { - return g.Add(CONNECT, path, h, m...) + return g.Add(http.MethodConnect, path, h, m...) } // DELETE implements `Echo#DELETE()` for sub-routes within the Group. func (g *Group) DELETE(path string, h HandlerFunc, m ...MiddlewareFunc) *Route { - return g.Add(DELETE, path, h, m...) + return g.Add(http.MethodDelete, path, h, m...) } // GET implements `Echo#GET()` for sub-routes within the Group. func (g *Group) GET(path string, h HandlerFunc, m ...MiddlewareFunc) *Route { - return g.Add(GET, path, h, m...) + return g.Add(http.MethodGet, path, h, m...) } // HEAD implements `Echo#HEAD()` for sub-routes within the Group. func (g *Group) HEAD(path string, h HandlerFunc, m ...MiddlewareFunc) *Route { - return g.Add(HEAD, path, h, m...) + return g.Add(http.MethodHead, path, h, m...) } // OPTIONS implements `Echo#OPTIONS()` for sub-routes within the Group. func (g *Group) OPTIONS(path string, h HandlerFunc, m ...MiddlewareFunc) *Route { - return g.Add(OPTIONS, path, h, m...) + return g.Add(http.MethodOptions, path, h, m...) } // PATCH implements `Echo#PATCH()` for sub-routes within the Group. func (g *Group) PATCH(path string, h HandlerFunc, m ...MiddlewareFunc) *Route { - return g.Add(PATCH, path, h, m...) + return g.Add(http.MethodPatch, path, h, m...) } // POST implements `Echo#POST()` for sub-routes within the Group. func (g *Group) POST(path string, h HandlerFunc, m ...MiddlewareFunc) *Route { - return g.Add(POST, path, h, m...) + return g.Add(http.MethodPost, path, h, m...) } // PUT implements `Echo#PUT()` for sub-routes within the Group. func (g *Group) PUT(path string, h HandlerFunc, m ...MiddlewareFunc) *Route { - return g.Add(PUT, path, h, m...) + return g.Add(http.MethodPut, path, h, m...) } // TRACE implements `Echo#TRACE()` for sub-routes within the Group. func (g *Group) TRACE(path string, h HandlerFunc, m ...MiddlewareFunc) *Route { - return g.Add(TRACE, path, h, m...) + return g.Add(http.MethodTrace, path, h, m...) } // Any implements `Echo#Any()` for sub-routes within the Group. |