1
0
mirror of https://github.com/labstack/echo.git synced 2024-11-24 08:22:21 +02:00

rm unused code

This commit is contained in:
chanxuehong 2018-06-21 21:25:58 +08:00 committed by Vishal Rana
parent d36ff72961
commit 5ac8bedce8

View File

@ -561,10 +561,6 @@ func (e *Echo) ServeHTTP(w http.ResponseWriter, r *http.Request) {
h := NotFoundHandler h := NotFoundHandler
if e.premiddleware == nil { if e.premiddleware == nil {
path := r.URL.RawPath
if path == "" {
path = r.URL.Path
}
e.router.Find(m, getPath(r), c) e.router.Find(m, getPath(r), c)
h = c.Handler() h = c.Handler()
for i := len(e.middleware) - 1; i >= 0; i-- { for i := len(e.middleware) - 1; i >= 0; i-- {
@ -572,10 +568,6 @@ func (e *Echo) ServeHTTP(w http.ResponseWriter, r *http.Request) {
} }
} else { } else {
h = func(c Context) error { h = func(c Context) error {
path := r.URL.RawPath
if path == "" {
path = r.URL.Path
}
e.router.Find(m, getPath(r), c) e.router.Find(m, getPath(r), c)
h := c.Handler() h := c.Handler()
for i := len(e.middleware) - 1; i >= 0; i-- { for i := len(e.middleware) - 1; i >= 0; i-- {