feat: 添加令牌ip白名单功能

This commit is contained in:
CalciumIon
2024-09-17 20:49:51 +08:00
parent feb1d76942
commit f505afdc10
6 changed files with 57 additions and 3 deletions

View File

@@ -128,6 +128,11 @@ func IntMax(a int, b int) int {
}
}
func IsIP(s string) bool {
ip := net.ParseIP(s)
return ip != nil
}
func GetUUID() string {
code := uuid.New().String()
code = strings.Replace(code, "-", "", -1)