func (c *Context) ShouldBind(obj interface{}) error {
b := binding.Default(c.Request.Method, c.ContentType())
return c.ShouldBindWith(obj, b)
}
ShouldBind 方法接受一个结构体实例(obj interface{})作为参数。它首先调用 binding.Default(c.Request.Method, c.ContentType()),根据请求的方法(c.Request.Method)和内容类型(c.ContentType())确定要使用的绑定器(b)。
它调用 c.ShouldBindWith(obj, b),将请求参数绑定到结构体实例。