Explorar o código

random: seed with Nanoseconds.

Dmitry Chestnykh %!s(int64=15) %!d(string=hai) anos
pai
achega
f14d4a9979
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      random.go

+ 1 - 1
random.go

@@ -14,7 +14,7 @@ const idLen = 20
 var idChars = []byte("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")
 
 func init() {
-	rand.Seed(time.Seconds())
+	rand.Seed(time.Nanoseconds())
 }
 
 // RandomDigits returns a byte slice of the given length containing