mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-23 18:22:23 +08:00
fix bug, return err when failed binding bool
This commit is contained in:
parent
bd4f73af67
commit
e4ce586cfe
@ -161,7 +161,7 @@ func setBoolField(val string, field reflect.Value) error {
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
field.SetBool(boolVal)
|
field.SetBool(boolVal)
|
||||||
}
|
}
|
||||||
return nil
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func setFloatField(val string, bitSize int, field reflect.Value) error {
|
func setFloatField(val string, bitSize int, field reflect.Value) error {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user