forked from mirror/gin
docs(readme): switch deprecated bindwith for mustbindwith
This commit is contained in:
parent
68aa2c38da
commit
544b8b4dc8
|
@ -461,7 +461,7 @@ func main() {
|
||||||
router := gin.Default()
|
router := gin.Default()
|
||||||
router.POST("/login", func(c *gin.Context) {
|
router.POST("/login", func(c *gin.Context) {
|
||||||
// you can bind multipart form with explicit binding declaration:
|
// you can bind multipart form with explicit binding declaration:
|
||||||
// c.BindWith(&form, binding.Form)
|
// c.MustBindWith(&form, binding.Form)
|
||||||
// or you can simply use autobinding with Bind method:
|
// or you can simply use autobinding with Bind method:
|
||||||
var form LoginForm
|
var form LoginForm
|
||||||
// in this case proper binding will be automatically selected
|
// in this case proper binding will be automatically selected
|
||||||
|
|
Loading…
Reference in New Issue