From ae9f03e6e80212e45427f811683f2a512cc8f506 Mon Sep 17 00:00:00 2001 From: Richard Lee Date: Sun, 12 Nov 2017 13:56:59 +0800 Subject: [PATCH] Fix up syntax error in README (#1155) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bffcce37..7d3b9194 100644 --- a/README.md +++ b/README.md @@ -472,7 +472,7 @@ func main() { // Example for binding JSON ({"user": "manu", "password": "123"}) router.POST("/loginJSON", func(c *gin.Context) { var json Login - if err = c.ShouldBindJSON(&json); err == nil { + if err := c.ShouldBindJSON(&json); err == nil { if json.User == "manu" && json.Password == "123" { c.JSON(http.StatusOK, gin.H{"status": "you are logged in"}) } else {