Update whats_new.md documentation

pull/3222/head
René 2024-11-29 16:04:10 +01:00
parent 6a36f6d4e6
commit 86fd29ac27
1 changed files with 164 additions and 159 deletions

View File

@ -68,7 +68,6 @@ We have made several changes to the Fiber app, including:
- **Listen**: Now has a configuration parameter.
- **Listener**: Now has a configuration parameter.
### CTX interface + customizable
Fiber v3 introduces a more customizable `Ctx` interface, allowing developers to create their own context classes. This flexibility enables you to extend the default context with additional methods and properties tailored to your application's needs.
@ -142,7 +141,6 @@ In this example, the `CustomCtx` struct extends the default `fiber.Ctx` with a c
</details>
## 🗺 Router
We have slightly adapted our router interface
@ -609,6 +607,7 @@ curl "http://localhost:3000/query?age=25"
curl "http://localhost:3000/query?age=abc"
# Output: 0
```
</details>
<details>
@ -640,6 +639,7 @@ curl -H "User-Agent: CustomAgent" "http://localhost:3000/header"
curl "http://localhost:3000/header"
# Output: "Unknown"
```
</details>
## 🧬 Middlewares
@ -1095,6 +1095,7 @@ app.Get("/old", func(c fiber.Ctx) error {
return c.Redirect().Route("newRoute")
})
```
</details>
2. **RedirectBack**: Use `c.Redirect().Back()` instead of `c.RedirectBack()`.
@ -1115,6 +1116,7 @@ app.Get("/back", func(c fiber.Ctx) error {
return c.Redirect().Back()
})
```
</details>
3. **Redirect**: Use `c.Redirect().To()` instead of `c.Redirect()`.
@ -1135,6 +1137,7 @@ app.Get("/old", func(c fiber.Ctx) error {
return c.Redirect().To("/new")
})
```
</details>
### 🌎 Client package
@ -1149,7 +1152,7 @@ Fiber v3 introduces a completely rebuilt client package with numerous new featur
#### Migration Instructions
**Import Path**
**Import Path**:
Update the import path to the new client package.
@ -1159,6 +1162,7 @@ Update the import path to the new client package.
```go
import "github.com/gofiber/fiber/v2/client"
```
</details>
<details>
@ -1167,6 +1171,7 @@ import "github.com/gofiber/fiber/v2/client"
```go
import "github.com/gofiber/fiber/v3/client"
```
</details>
:::caution