Y
Hacker News
new
|
ask
|
show
|
jobs
by
egeozcan
4728 days ago
In Go, am I supposed to seed the rand manually?
http://i.imgur.com/Rw5afx9.png
1 comments
shakesbeard
4728 days ago
Yes. The default seed is 1. You can set your own using something like this:
rand.Seed(time.Now().UnixNano())
link
f2f
4728 days ago
or, better yet, use crypto/rand to seed it.
link