You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/extra/internal.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -180,7 +180,7 @@ Middleware are executed in the order they are registered. This sequential design
180
180
181
181
Fiber allows mounting sub‑applications (or sub‑routers) under specific path prefixes. This enables modular design of large APIs. The mounting process works as follows:
182
182
183
-
1. Defining a Mount Point: A parent application calls `App.Mount()` or a Group calls its own `mount()` method.
183
+
1. Defining a Mount Point: A parent application (or group) calls `Use` with a sub-app, which triggers the internal mount path logic.
184
184
2. Merging Mount Fields: The sub‑app’s mount fields are updated with the prefix of the parent, and its routes are integrated into the parent’s routing structure.
185
185
3. Processing Sub‑App Routes: During startup, the parent app collects routes from mounted sub‑apps and builds a unified route tree.
Copy file name to clipboardExpand all lines: docs/whats_new.md
+15-13Lines changed: 15 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,9 +59,9 @@ Here's a quick overview of the changes in Fiber `v3`:
59
59
-[🔌 Addons](#-addons)
60
60
-[📋 Migration guide](#-migration-guide)
61
61
62
-
## Drop for old Go versions
62
+
## Dropping support for old Go versions
63
63
64
-
Fiber `v3`drops support for Go versions below `1.25`. We recommend upgrading to Go `1.25` or higher to use Fiber `v3`.
64
+
Fiber `v3`requires Go `1.25` or later. Update your toolchain to `1.25+` before upgrading so the module `go` directive and standard library features align with the new minimum version.
65
65
66
66
## 🚀 App
67
67
@@ -248,13 +248,13 @@ app.Shutdown() // Never reached
248
248
249
249
We have made several changes to the Fiber listen, including:
250
250
251
-
- Removed `OnShutdownError` and `OnShutdownSuccess` from `ListenerConfig` in favor of using `OnPostShutdown` hook which receives the shutdown error
251
+
- Removed `OnShutdownError` and `OnShutdownSuccess` from `ListenConfig` in favor of using the `OnPostShutdown` hook, which receives the shutdown error
252
252
253
253
```go
254
254
app:= fiber.New()
255
255
256
-
// Before - using ListenerConfig callbacks
257
-
app.Listen(":3000", fiber.ListenerConfig{
256
+
// Before - using ListenConfig callbacks
257
+
app.Listen(":3000", fiber.ListenConfig{
258
258
OnShutdownError: func(err error) {
259
259
log.Printf("Shutdown error: %v", err)
260
260
},
@@ -293,7 +293,7 @@ app.Listen("app.sock")
293
293
294
294
// v3 - Fiber does it for you
295
295
app:= fiber.New()
296
-
app.Listen("app.sock", fiber.ListenerConfig{
296
+
app.Listen("app.sock", fiber.ListenConfig{
297
297
ListenerNetwork: fiber.NetworkUnix,
298
298
UnixSocketFileMode: 0770,
299
299
})
@@ -1380,8 +1380,8 @@ The `ExcludeVars` field has been removed from the EnvVar middleware configuratio
1380
1380
1381
1381
### Filesystem
1382
1382
1383
-
We've decided to remove filesystem middleware to clear up the confusion between static and filesystem middleware.
1384
-
Now, static middleware can do everything that filesystem middleware and static do. You can check out [static middleware](./middleware/static.md) or [migration guide](#-migration-guide) to see what has been changed.
1383
+
The filesystem middleware was removed to reduce confusion with the static middleware.
1384
+
The static middleware now covers the functionality of both. Review the [static middleware](./middleware/static.md) docs or the [migration guide](#-migration-guide) for the updated usage.
1385
1385
1386
1386
### Healthcheck
1387
1387
@@ -1397,7 +1397,7 @@ New `Challenge`, `Error`, `ErrorDescription`, `ErrorURI`, and `Scope` fields all
1397
1397
1398
1398
### Logger
1399
1399
1400
-
New helper function called `LoggerToWriter` has been added to the logger middleware. This function allows you to use 3rd party loggers such as `logrus` or `zap` with the Fiber logger middleware without any extra afford. For example, you can use `zap` with Fiber logger middleware like this:
1400
+
New helper function called `LoggerToWriter` has been added to the logger middleware. This function allows you to use 3rd party loggers such as `logrus` or `zap` with the Fiber logger middleware without an extra adapter. For example, you can use `zap` with Fiber logger middleware like this:
1401
1401
1402
1402
Custom logger integrations should update any `LoggerFunc` implementations to the new signature that receives a pointer to the middleware config: `func(c fiber.Ctx, data *logger.Data, cfg *logger.Config) error`.
1403
1403
@@ -1794,8 +1794,9 @@ app.OnShutdown(func() {
1794
1794
1795
1795
```go
1796
1796
// After
1797
-
app.OnPreShutdown(func() {
1797
+
app.Hooks().OnPreShutdown(func()error {
1798
1798
// Code to run before shutdown
1799
+
returnnil
1799
1800
})
1800
1801
```
1801
1802
@@ -1804,7 +1805,8 @@ app.OnPreShutdown(func() {
1804
1805
The `Listen` helpers (`ListenTLS`, `ListenMutualTLS`, etc.) were removed. Use
1805
1806
`app.Listen()` with `fiber.ListenConfig` and a `tls.Config` when TLS is required.
1806
1807
Options such as `ListenerNetwork` and `UnixSocketFileMode` are now configured via
1807
-
this struct.
1808
+
this struct. Prefer `TLSConfig` when you need full control, or use `CertFile` and
0 commit comments