mirror of
https://github.com/gofiber/fiber.git
synced 2025-07-13 15:48:13 +00:00
fix typo for paramsInt function (#1913)
This commit is contained in:
parent
deb02cb64e
commit
061c2a9e12
2
ctx.go
2
ctx.go
@ -858,7 +858,7 @@ func (c *Ctx) AllParams() map[string]string {
|
||||
// it defaults to zero if the parameter is not found or if the
|
||||
// parameter cannot be converted to an integer
|
||||
// If a default value is given, it will return that value in case the param
|
||||
// doesn't exist or cannot be converted to an integrer
|
||||
// doesn't exist or cannot be converted to an integer
|
||||
func (c *Ctx) ParamsInt(key string, defaultValue ...int) (int, error) {
|
||||
// Use Atoi to convert the param to an int or return zero and an error
|
||||
value, err := strconv.Atoi(c.Params(key))
|
||||
|
Loading…
x
Reference in New Issue
Block a user