1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-24 20:14:31 +02:00

Fixed #1 - Reset context

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2015-07-14 10:56:23 -07:00
parent 6430299ca0
commit 6d733d3120

View File

@ -94,6 +94,9 @@ func (c *Context) Get(key string) interface{} {
// Set saves data in the context.
func (c *Context) Set(key string, val interface{}) {
if c.store == nil {
c.store = make(store)
}
c.store[key] = val
}
@ -180,5 +183,6 @@ func (c *Context) reset(r *http.Request, w http.ResponseWriter, e *Echo) {
c.request = r
c.response.reset(w)
c.query = nil
c.store = nil
c.echo = e
}