Skip to content

Commit

Permalink
Add docs from gofiber/fiber@f725ded
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 15, 2024
1 parent 46737cd commit 96738a0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/core/middleware/requestid.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ func handler(c fiber.Ctx) error {
}
```

In version v3, Fiber will inject `requestID` into the built-in `Context` of Go.

```go
func handler(c fiber.Ctx) error {
id := requestid.FromContext(c.Context())
log.Printf("Request ID: %s", id)
return c.SendString("Hello, World!")
}
```

## Config

| Property | Type | Description | Default |
Expand Down

0 comments on commit 96738a0

Please sign in to comment.