Skip to content

Commit

Permalink
Deterministic state
Browse files Browse the repository at this point in the history
  • Loading branch information
web-flow committed Jul 1, 2021
1 parent f5844de commit e0fe0a8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions string.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ func RandString(length int, letter string) string {
}

bytes := make([]byte, length)
rand.Seed(time.Now().UnixNano())
rand.Read(bytes)
for i := range bytes {
bytes[i] = alphabet[rand.Int63()%int64(len(alphabet))]
Expand Down

0 comments on commit e0fe0a8

Please sign in to comment.