diff --git a/web/cpool.go b/web/cpool.go index 98aa688..59f8764 100644 --- a/web/cpool.go +++ b/web/cpool.go @@ -14,9 +14,8 @@ func (c *cPool) alloc() *cStack { cs := (*sync.Pool)(c).Get() if cs == nil { return nil - } else { - return cs.(*cStack) } + return cs.(*cStack) } func (c *cPool) release(cs *cStack) { diff --git a/web/router.go b/web/router.go index cc52d96..cf93d93 100644 --- a/web/router.go +++ b/web/router.go @@ -209,9 +209,8 @@ func (rm routeMachine) route(c *C, w http.ResponseWriter, r *http.Request) (meth if matchRoute(rm.routes[si], m, &methods, r, c) { rm.routes[si].handler.ServeHTTPC(*c, w, r) return 0, true - } else { - i++ } + i++ } else if (match && sm&smJumpOnMatch != 0) || (!match && sm&smJumpOnMatch == 0) {