diff --git a/util.go b/util.go index 5522a39..9d85bce 100644 --- a/util.go +++ b/util.go @@ -2,8 +2,15 @@ package main import ( "math/rand" + "time" ) +var random *rand.Rand + +func init() { + random = rand.New(rand.NewSource(time.Now().UnixNano())) +} + const letterBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" func RandStringBytes(n int) string {