(rawCtx any, fctx *fasthttp.RequestCtx)
| 103 | } |
| 104 | |
| 105 | func (*App) prepareDefaultCtx(rawCtx any, fctx *fasthttp.RequestCtx) (*DefaultCtx, bool) { |
| 106 | ctx, ok := rawCtx.(*DefaultCtx) |
| 107 | if !ok { |
| 108 | if _, ok := rawCtx.(CustomCtx); ok { |
| 109 | return nil, false |
| 110 | } |
| 111 | panic(errDefaultCtxTypeAssertion) |
| 112 | } |
| 113 | |
| 114 | ctx.Reset(fctx) |
| 115 | |
| 116 | return ctx, true |
| 117 | } |
| 118 | |
| 119 | // ReleaseCtx releases the ctx back into the pool. |
| 120 | // If the context was abandoned (e.g., by timeout middleware), this is a no-op. |