NewWithCustomCtx creates a new Fiber instance and applies the provided function to generate a custom context type. It mirrors the behavior of calling `New()` followed by `app.setCtxFunc(fn)`.
(newCtxFunc func(app *App) CustomCtx, config ...Config)
| 791 | // provided function to generate a custom context type. It mirrors the behavior |
| 792 | // of calling `New()` followed by `app.setCtxFunc(fn)`. |
| 793 | func NewWithCustomCtx(newCtxFunc func(app *App) CustomCtx, config ...Config) *App { |
| 794 | app := New(config...) |
| 795 | app.setCtxFunc(newCtxFunc) |
| 796 | return app |
| 797 | } |
| 798 | |
| 799 | // GetString returns s unchanged when Immutable is off or s is read-only (rodata). |
| 800 | // Otherwise, it returns a detached copy (strings.Clone). |