Skip to content

Commit

Permalink
feat: switch to srand.Secure
Browse files Browse the repository at this point in the history
  • Loading branch information
moul committed Feb 23, 2020
1 parent 1de47a1 commit ac91dbc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/depviz/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"moul.io/depviz/v3/internal/dvserver"
"moul.io/depviz/v3/internal/dvstore"
"moul.io/godev"
"moul.io/srand"
)

var (
Expand Down Expand Up @@ -139,7 +140,7 @@ func main() {
}

func globalPreRun() error {
rand.Seed(time.Now().UnixNano())
rand.Seed(srand.Secure())

config := zap.NewDevelopmentConfig()
config.EncoderConfig.EncodeLevel = zapcore.CapitalColorLevelEncoder
Expand Down
1 change: 1 addition & 0 deletions go.mod

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ac91dbc

Please sign in to comment.