feat: 加入渠道加权随机功能
This commit is contained in:
1 parent
18a9c2b57e
commit
433f7affe9
5 files changed
+86
-8
No files matched your search
@@ -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()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user