Call rand.Seed to end current determinism

This commit is contained in:
Marc Di Luzio 2020-06-27 02:08:52 +01:00
parent 6ba6584ae1
commit 2556c0d049

View file

@ -4,10 +4,12 @@ import (
"flag"
"fmt"
"log"
"math/rand"
"os"
"os/signal"
"strconv"
"syscall"
"time"
"github.com/mdiluz/rove/cmd/rove-server/internal"
"github.com/mdiluz/rove/pkg/persistence"
@ -23,6 +25,9 @@ var data = os.Getenv("DATA_PATH")
var tick = os.Getenv("TICK_RATE")
func InnerMain() {
// Ensure we've seeded rand
rand.Seed(time.Now().UTC().UnixNano())
flag.Parse()
// Print the version if requested