mirror of
https://github.com/labstack/echo.git
synced 2025-03-19 21:17:58 +02:00
refactor c
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
parent
76125a53e5
commit
2a9271d23f
6
echo.go
6
echo.go
@ -545,15 +545,15 @@ func (e *Echo) ServeHTTP(req engine.Request, res engine.Response) {
|
||||
c.Reset(req, res)
|
||||
|
||||
// Middleware
|
||||
h := func(carg Context) error {
|
||||
h := func(c Context) error {
|
||||
method := req.Method()
|
||||
path := req.URL().Path()
|
||||
e.router.Find(method, path, c)
|
||||
h := c.handler
|
||||
h := c.Handler()
|
||||
for i := len(e.middleware) - 1; i >= 0; i-- {
|
||||
h = e.middleware[i](h)
|
||||
}
|
||||
return h(carg)
|
||||
return h(c)
|
||||
}
|
||||
|
||||
// Premiddleware
|
||||
|
Loading…
x
Reference in New Issue
Block a user