mirror of
https://github.com/gin-gonic/gin.git
synced 2026-01-11 00:56:57 +08:00
Merge 05c2fda5b71b94ecfe86d147975181ab62643a05 into 957f6205c83edda01be3a6dd74cdc1859b660ba0
This commit is contained in:
commit
663fe64535
@ -348,11 +348,7 @@ func (c *Context) BindJSON(obj interface{}) error {
|
||||
// BindWith binds the passed struct pointer using the specified binding engine.
|
||||
// See the binding package.
|
||||
func (c *Context) BindWith(obj interface{}, b binding.Binding) error {
|
||||
if err := b.Bind(c.Request, obj); err != nil {
|
||||
c.AbortWithError(400, err).SetType(ErrorTypeBind)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
return b.Bind(c.Request, obj)
|
||||
}
|
||||
|
||||
// ClientIP implements a best effort algorithm to return the real client IP, it parses
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user