From c7013e4ea2f76cca15e7b2d950b363e9cc3d60ed Mon Sep 17 00:00:00 2001 From: Maksimov Sergey Date: Wed, 27 May 2015 08:59:50 +0300 Subject: [PATCH 1/2] Fixed "Multipart Form" section in README.md --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c8fe60e3..ee26758d 100644 --- a/README.md +++ b/README.md @@ -181,7 +181,12 @@ func main() { r.POST("/login", func(c *gin.Context) { var form LoginForm - c.BindWith(&form, binding.MultipartForm) + + // you can bind multipart form with explicit binding declaration: + // c.BindWith(&form, binding.Form) + // or you can simply use autobinding with Bind method: + + c.Bind(&form) // in this case proper binding will be automatically selected if form.User == "user" && form.Password == "password" { c.JSON(200, gin.H{"status": "you are logged in"}) From f06e80799bf9e24289a15a1cd44b494851e8f896 Mon Sep 17 00:00:00 2001 From: Maksimov Sergey Date: Wed, 27 May 2015 09:01:32 +0300 Subject: [PATCH 2/2] blank line removed --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index ee26758d..95634c15 100644 --- a/README.md +++ b/README.md @@ -185,7 +185,6 @@ func main() { // you can bind multipart form with explicit binding declaration: // c.BindWith(&form, binding.Form) // or you can simply use autobinding with Bind method: - c.Bind(&form) // in this case proper binding will be automatically selected if form.User == "user" && form.Password == "password" {