vendor/github.com/spf13/afero/ioutil.go
changeset 260 445e01aede7e
parent 256 6d9efbef00a9
--- a/vendor/github.com/spf13/afero/ioutil.go	Tue Aug 23 22:33:28 2022 +0200
+++ b/vendor/github.com/spf13/afero/ioutil.go	Tue Aug 23 22:39:43 2022 +0200
@@ -141,7 +141,7 @@
 // We generate random temporary file names so that there's a good
 // chance the file doesn't exist yet - keeps the number of tries in
 // TempFile to a minimum.
-var rand uint32
+var randNum uint32
 var randmu sync.Mutex
 
 func reseed() uint32 {
@@ -150,12 +150,12 @@
 
 func nextRandom() string {
 	randmu.Lock()
-	r := rand
+	r := randNum
 	if r == 0 {
 		r = reseed()
 	}
 	r = r*1664525 + 1013904223 // constants from Numerical Recipes
-	rand = r
+	randNum = r
 	randmu.Unlock()
 	return strconv.Itoa(int(1e9 + r%1e9))[1:]
 }
@@ -194,7 +194,7 @@
 		if os.IsExist(err) {
 			if nconflict++; nconflict > 10 {
 				randmu.Lock()
-				rand = reseed()
+				randNum = reseed()
 				randmu.Unlock()
 			}
 			continue
@@ -226,7 +226,7 @@
 		if os.IsExist(err) {
 			if nconflict++; nconflict > 10 {
 				randmu.Lock()
-				rand = reseed()
+				randNum = reseed()
 				randmu.Unlock()
 			}
 			continue