mirror of
https://github.com/gofiber/fiber.git
synced 2025-05-31 11:52:41 +00:00
📚 Doc: Update recover docs to not use reserved keyword (#3129)
update(docs): avoid using reserved keyword
This commit is contained in:
parent
62f66e5968
commit
96891c93d3
@ -19,7 +19,7 @@ Import the middleware package that is part of the Fiber web framework
|
|||||||
```go
|
```go
|
||||||
import (
|
import (
|
||||||
"github.com/gofiber/fiber/v3"
|
"github.com/gofiber/fiber/v3"
|
||||||
"github.com/gofiber/fiber/v3/middleware/recover"
|
recoverer "github.com/gofiber/fiber/v3/middleware/recover"
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ After you initiate your Fiber app, you can use the following possibilities:
|
|||||||
|
|
||||||
```go
|
```go
|
||||||
// Initialize default config
|
// Initialize default config
|
||||||
app.Use(recover.New())
|
app.Use(recoverer.New())
|
||||||
|
|
||||||
// This panic will be caught by the middleware
|
// This panic will be caught by the middleware
|
||||||
app.Get("/", func(c fiber.Ctx) error {
|
app.Get("/", func(c fiber.Ctx) error {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user