优化代码

This commit is contained in:
GoEdgeLab
2022-08-23 14:55:06 +08:00
parent fb3082a951
commit 3be0275081
3 changed files with 11 additions and 7 deletions

View File

@@ -10,7 +10,7 @@ import (
"time"
)
// 生成Token
// Generate 生成Token
func Generate() string {
timestamp := strconv.FormatInt(time.Now().Unix(), 10)
@@ -23,7 +23,7 @@ func Generate() string {
return token
}
// 校验Token
// Validate 校验Token
func Validate(token string) (b bool) {
if len(token) == 0 {
return