Пример #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
}
Пример #2
0
// 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,
	}
}
Пример #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
}