Skip to content

Commit

Permalink
seed the random number generator at startup (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
fardog authored Apr 20, 2017
1 parent 9e687d2 commit e2f344c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/secure-operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ package main
import (
"flag"
"fmt"
"math/rand"
"os"
"os/signal"
"path/filepath"
"syscall"
"time"

log "github.com/Sirupsen/logrus"
"github.com/miekg/dns"
Expand Down Expand Up @@ -89,6 +91,10 @@ func main() {
}
flag.Parse()

// seed the global random number generator, used in some utilities and the
// google provider
rand.Seed(time.Now().UTC().UnixNano())

// set the loglevel
level, err := log.ParseLevel(*logLevel)
if err != nil {
Expand Down

0 comments on commit e2f344c

Please sign in to comment.