diff options
author | Moritz Poldrack <git@moritz.sh> | 2023-10-25 22:52:30 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-10-26 00:29:25 +0200 |
commit | f4166e07439fc08b3a632664a74ec6943b2050c7 (patch) | |
tree | ce2188b5483bc47ba29254a8fcf8c36d88da7941 | |
parent | 2d9654df229b97237cd9a9157ac96d89c5ce2630 (diff) | |
download | aerc-f4166e07439fc08b3a632664a74ec6943b2050c7.tar.gz |
aerc: initialise the random number generator
Add an init function to the main package that seeds the RNG with based
on the current time.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
-rw-r--r-- | main.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -5,6 +5,7 @@ import ( "encoding/base64" "errors" "fmt" + "math/rand" "os" "runtime" "sort" @@ -321,3 +322,7 @@ loop: } } } + +func init() { + rand.Seed(time.Now().UnixNano()) +} |