From a6f1a57e0aacd46a0d6184dad6eaf9ee4ed4f342 Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Tue, 29 Mar 2022 07:46:37 -0500 Subject: Seed RNG if not debugging --- sd.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sd.go b/sd.go index 767bc81..4470b28 100644 --- a/sd.go +++ b/sd.go @@ -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) -- cgit v1.2.3-70-g09d2