From b50194035f4fb51ef7045ac7a3c395c80f658fa5 Mon Sep 17 00:00:00 2001 From: mulberror Date: Sun, 18 Jan 2026 17:15:47 +0800 Subject: [PATCH] docs: update gin.md --- src/community/pkgs/web/gin.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/community/pkgs/web/gin.md b/src/community/pkgs/web/gin.md index 35fccac9c..7649df419 100644 --- a/src/community/pkgs/web/gin.md +++ b/src/community/pkgs/web/gin.md @@ -312,12 +312,12 @@ import ( ) type LoginUser struct { - Username string `bind:"required" json:"username" form:"username" uri:"username"` - Password string `bind:"required" json:"password" form:"password" uri:"password"` + Username string `binding:"required" json:"username" form:"username" uri:"username"` + Password string `binding:"required" json:"password" form:"password" uri:"password"` } func main() { - e := gin.Default() + e := gin.Default() e.POST("/loginWithJSON", Login) e.POST("/loginWithForm", Login) e.GET("/loginWithQuery/:username/:password", Login)