Skip to content

Commit

Permalink
refactor: let the RNG autoseed, compat for golang 1.20
Browse files Browse the repository at this point in the history
According to documentation:
> If Seed is not called, the generator is seeded randomly at program startup.
  • Loading branch information
npdgm committed Jul 12, 2023
1 parent 696e583 commit 4af861f
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions cmd/x509-certificate-exporter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

import (
"fmt"
"math/rand"
"net/http"
_ "net/http/pprof"
"os"
Expand Down Expand Up @@ -135,7 +134,6 @@ func main() {
}
}

rand.Seed(time.Now().UnixNano())
err := exporter.ListenAndServe()
if err != nil {
log.Fatal("failed to start server: ", err)
Expand Down

0 comments on commit 4af861f

Please sign in to comment.