Merge pull request #71170 from atlassian/rand-cleanup2

Cleanup math/rand package usage
This commit is contained in:
Kubernetes Prow Robot
2019-07-01 21:33:08 -07:00
committed by GitHub
19 changed files with 144 additions and 35 deletions

View File

@@ -1344,8 +1344,7 @@ func LoadClientset() (*clientset.Clientset, error) {
// need to use such a function and can instead
// use the UUID utility function.
func RandomSuffix() string {
r := rand.New(rand.NewSource(time.Now().UnixNano()))
return strconv.Itoa(r.Int() % 10000)
return strconv.Itoa(rand.Intn(10000))
}
// ExpectEqual expects the specified two are the same, otherwise an exception raises