1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-21 19:37:38 +00:00

Switch to go modules

This commit is contained in:
Darren Shepherd
2019-08-19 10:52:07 -07:00
parent bcb1d41114
commit d2ae2b8e06
1809 changed files with 270893 additions and 76629 deletions

View File

@@ -27,7 +27,14 @@ var rng = struct {
sync.Mutex
rand *rand.Rand
}{
rand: rand.New(rand.NewSource(time.Now().UTC().UnixNano())),
rand: rand.New(rand.NewSource(time.Now().UnixNano())),
}
// Int returns a non-negative pseudo-random int.
func Int() int {
rng.Lock()
defer rng.Unlock()
return rng.rand.Int()
}
// Intn generates an integer in range [0,max).