mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-16 16:13:56 +00:00
feat: switch priority when retry (close #1048)
This commit is contained in:
8
common/random.go
Normal file
8
common/random.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package common
|
||||
|
||||
import "math/rand"
|
||||
|
||||
// RandRange returns a random number between min and max (max is not included)
|
||||
func RandRange(min, max int) int {
|
||||
return min + rand.Intn(max-min)
|
||||
}
|
Reference in New Issue
Block a user