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

This commit is contained in:
CaIon
2023-12-27 19:00:47 +08:00
parent 1a8a24698f
commit bdd611fd33
5 changed files with 86 additions and 8 deletions

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()
}