mirror of https://github.com/gofiber/fiber.git
📚 Doc: Update recover docs to not use reserved keyword (#3129)
update(docs): avoid using reserved keywordpull/3133/head
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…
Reference in New Issue