mirror of
https://github.com/adams549659584/go-proxy-bingai.git
synced 2025-06-03 15:02:30 +08:00
13 lines
192 B
Go
13 lines
192 B
Go
|
package common
|
||
|
|
||
|
import (
|
||
|
"math/rand"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
func RandInt(min int, max int) int {
|
||
|
seed := time.Now().UnixNano()
|
||
|
rng := rand.New(rand.NewSource(seed))
|
||
|
return rng.Intn(max-min+1) + min
|
||
|
}
|