Преглед на файлове

Errors in context are removed

Manu Mtz-Almeida преди 12 години
родител
ревизия
c7fdc2e03a
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      context.go

+ 1 - 1
context.go

@@ -72,12 +72,12 @@ type Context struct {
 func (engine *Engine) createContext(w http.ResponseWriter, req *http.Request, params httprouter.Params, handlers []HandlerFunc) *Context {
 func (engine *Engine) createContext(w http.ResponseWriter, req *http.Request, params httprouter.Params, handlers []HandlerFunc) *Context {
 	c := engine.cache.Get().(*Context)
 	c := engine.cache.Get().(*Context)
 	c.writermem.reset(w)
 	c.writermem.reset(w)
-
 	c.Request = req
 	c.Request = req
 	c.Params = params
 	c.Params = params
 	c.handlers = handlers
 	c.handlers = handlers
 	c.Keys = nil
 	c.Keys = nil
 	c.index = -1
 	c.index = -1
+	c.Errors = c.Errors[0:0]
 	return c
 	return c
 }
 }