From 3c41d88630dc6be5ae20a18b047335ef8c6f3c18 Mon Sep 17 00:00:00 2001 From: Richard Lee Date: Wed, 1 Nov 2017 23:23:51 +0800 Subject: [PATCH] Fix up syntax error in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b7181036..ded9a36d 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 {