]> git.r.bdr.sh - rbdr/mobius/commitdiff
Seed the random number generator
authorJeff Halter <redacted>
Mon, 6 Jun 2022 15:36:18 +0000 (08:36 -0700)
committerJeff Halter <redacted>
Mon, 6 Jun 2022 15:36:18 +0000 (08:36 -0700)
cmd/mobius-hotline-server/main.go

index aa1f015ee2aefcbcffd86b7f60e459bcf86390e5..285f67b534eb42fcc0fb91a68237db9814e41d69 100644 (file)
@@ -7,7 +7,9 @@ import (
        "github.com/jhalter/mobius/hotline"
        "go.uber.org/zap"
        "go.uber.org/zap/zapcore"
        "github.com/jhalter/mobius/hotline"
        "go.uber.org/zap"
        "go.uber.org/zap/zapcore"
+       "math/rand"
        "os"
        "os"
+       "time"
 )
 
 const (
 )
 
 const (
@@ -16,6 +18,8 @@ const (
 )
 
 func main() {
 )
 
 func main() {
+       rand.Seed(time.Now().UnixNano())
+
        ctx, cancelRoot := context.WithCancel(context.Background())
 
        basePort := flag.Int("bind", defaultPort, "Bind address and port")
        ctx, cancelRoot := context.WithCancel(context.Background())
 
        basePort := flag.Int("bind", defaultPort, "Bind address and port")