Change deprecated struct elements (#1335)

Duration and Store are deprecated, so we should show Expiration and Storage in example
pull/1337/head
sadfun 2021-05-18 15:56:55 +07:00 committed by GitHub
parent da1877f16c
commit 547bdb1c23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -53,14 +53,14 @@ app.Use(limiter.New(limiter.Config{
return c.IP() == "127.0.0.1"
},
Max: 20,
Duration: 30 * time.Second,
Expiration: 30 * time.Second,
KeyGenerator: func(c *fiber.Ctx) string{
return "key"
}
LimitReached: func(c *fiber.Ctx) error {
return c.SendFile("./toofast.html")
},
Store: myCustomStore{}
Storage: myCustomStore{}
}))
```