Exemplo n.º 1
0
func (c *context) Reset(req engine.Request, res engine.Response) {
	c.stdContext = gcontext.Background()
	c.request = req
	c.response = res
	c.store = nil
	c.handler = NotFoundHandler
}
Exemplo n.º 2
0
Arquivo: echo.go Projeto: AlekSi/echo
// NewContext returns a Context instance.
func (e *Echo) NewContext(req engine.Request, res engine.Response) Context {
	return &context{
		stdContext: gcontext.Background(),
		request:    req,
		response:   res,
		store:      make(store),
		echo:       e,
		pvalues:    make([]string, *e.maxParam),
		handler:    NotFoundHandler,
	}
}
Exemplo n.º 3
0
func (c *echoContext) Reset(req engine.Request, res engine.Response) {
	c.context = context.Background()
	c.request = req
	c.response = res
	c.handler = NotFoundHandler
}