feat: 加入渠道加权随机功能

This commit is contained in:
CaIon
2023-12-27 19:00:47 +08:00
parent 18a9c2b57e
commit 433f7affe9
5 changed files with 86 additions and 8 deletions
+5
View File
@@ -168,6 +168,11 @@ func GetRandomString(length int) string {
return string(key)
}
func GetRandomInt(max int) int {
//rand.Seed(time.Now().UnixNano())
return rand.Intn(max)
}
func GetTimestamp() int64 {
return time.Now().Unix()
}