NewDefaultCtx constructs the default context implementation bound to the provided application.
(app *App)
| 51 | // NewDefaultCtx constructs the default context implementation bound to the |
| 52 | // provided application. |
| 53 | func NewDefaultCtx(app *App) *DefaultCtx { |
| 54 | // return ctx |
| 55 | ctx := &DefaultCtx{ |
| 56 | // Set app reference |
| 57 | app: app, |
| 58 | } |
| 59 | ctx.DefaultReq.c = ctx |
| 60 | ctx.DefaultRes.c = ctx |
| 61 | |
| 62 | return ctx |
| 63 | } |
| 64 | |
| 65 | // AcquireCtx retrieves a new Ctx from the pool. |
| 66 | func (app *App) AcquireCtx(fctx *fasthttp.RequestCtx) CustomCtx { |
no outgoing calls