Browse Source

update user data comment

jflyfox 4 years ago
parent
commit
655f95abfa
3 changed files with 4 additions and 3 deletions
  1. 2 1
      README.md
  2. 1 1
      example/sample/main.go
  3. 1 1
      example/sample1/main.go

+ 2 - 1
README.md

@@ -149,7 +149,8 @@ func Login(r *ghttp.Request) (string, interface{}) {
 		r.Response.WriteJson(gtoken.Fail("账号或密码错误."))
 		r.ExitAll()
 	}
-
+	
+    // 第一个字段是用户唯一标识,第二个字段是扩展参数user data
 	return username, ""
 }
 ```

+ 1 - 1
example/sample/main.go

@@ -102,7 +102,7 @@ func Login(r *ghttp.Request) (string, interface{}) {
 		r.Response.WriteJson(gtoken.Fail("账号或密码错误."))
 		r.ExitAll()
 	}
-
+	// 唯一标识,扩展参数user data
 	return username, "1"
 }
 

+ 1 - 1
example/sample1/main.go

@@ -81,7 +81,7 @@ func Login(r *ghttp.Request) (string, interface{}) {
 		r.Response.WriteJson(gtoken.Fail("账号或密码错误."))
 		r.ExitAll()
 	}
-
+	// 唯一标识,扩展参数user data
 	return username, "1"
 }