diff options
author | Anthony Wang | 2022-03-29 07:46:37 -0500 |
---|---|---|
committer | Anthony Wang | 2022-03-29 07:46:37 -0500 |
commit | a6f1a57e0aacd46a0d6184dad6eaf9ee4ed4f342 (patch) | |
tree | c46893110bf3d42a0c77b5201ac9b2cd4619d608 | |
parent | 0f9882eaaa4cbefa200a8204f1d3c9566912b9fc (diff) |
Seed RNG if not debugging
-rw-r--r-- | sd.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -7,6 +7,7 @@ import ( "math/rand" "os" "os/exec" + "time" _ "modernc.org/sqlite" ) @@ -17,6 +18,11 @@ var ( ) func main() { + if !*verbose { + // Seed the RNG + rand.Seed(time.Now().UnixNano()) + } + flag.Parse() db, err := sql.Open("sqlite", *file) |