From 43bf81f08a064bbc2563c8e24f8a825100427b8e Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Fri, 30 Aug 2013 16:09:56 +0200 Subject: Seeding the PRNG --- main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.go b/main.go index 8b57a3c..632bde1 100644 --- a/main.go +++ b/main.go @@ -9,7 +9,9 @@ import ( "github.com/kch42/simpleconf" _ "kch42.de/gostuff/mailremind/model/mysql" "log" + "math/rand" "net/http" + "time" ) func debug(rw http.ResponseWriter, req *http.Request) { @@ -56,6 +58,8 @@ func main() { log.Fatalf("Could not get web.baseurl from config: %s", err) } + rand.Seed(time.Now().UnixNano()) + initSessions() initTpls() loadTimeLocs() -- cgit v1.2.3-70-g09d2