From 293d8af42766444bf47c39849988cb90175c2a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Said=20=C3=87engel?= Date: Tue, 16 Dec 2025 23:33:30 +0300 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=93=9A=20Doc:=20Fix=20custom=20contex?= =?UTF-8?q?t=20example=20in=20whats=5Fnew.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Correct the custom context example to use fiber.DefaultCtx and fiber.NewDefaultCtx instead of fiber.Ctx and fiber.NewCtx --- docs/whats_new.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/whats_new.md b/docs/whats_new.md index e431b8ebe53..acbc2c8afef 100644 --- a/docs/whats_new.md +++ b/docs/whats_new.md @@ -159,7 +159,7 @@ import ( ) type CustomCtx struct { - fiber.Ctx + fiber.DefaultCtx } func (c *CustomCtx) CustomMethod() string { @@ -167,9 +167,9 @@ func (c *CustomCtx) CustomMethod() string { } func main() { - app := fiber.NewWithCustomCtx(func(app *fiber.App) fiber.Ctx { + app := fiber.NewWithCustomCtx(func(app *fiber.App) fiber.CustomCtx { return &CustomCtx{ - Ctx: *fiber.NewCtx(app), + DefaultCtx: *fiber.NewDefaultCtx(app), } }) From 30ea6c74cb5b69f91e728859b5d6f5e65ef136a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Said=20=C3=87engel?= Date: Wed, 17 Dec 2025 07:06:29 +0300 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9A=20Doc:=20Change=20=E2=80=9C#?= =?UTF-8?q?=20Use=E2=80=9D=20to=20=E2=80=9C##=20Use=E2=80=9D=20in=20handle?= =?UTF-8?q?r.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/partials/routing/handler.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/partials/routing/handler.md b/docs/partials/routing/handler.md index 3ad6f7d7216..a83732b405f 100644 --- a/docs/partials/routing/handler.md +++ b/docs/partials/routing/handler.md @@ -114,7 +114,7 @@ app.Post("/api/register", func(c fiber.Ctx) error { }) ``` -# Use +## Use Can be used for middleware packages and prefix catchers. Prefixes now require either an exact match or a slash boundary, so `/john` matches `/john` and `/john/doe` but not `/johnnnnn`. Parameter tokens like `:name`, `:name?`, `*`, and `+` are still expanded before the boundary check runs.