Skip to content

Commit

Permalink
add no-lint for SA1019 (rand.Seed deprecation in go 1.20)
Browse files Browse the repository at this point in the history
  • Loading branch information
cahillsf committed Sep 14, 2023
1 parent dfe14e2 commit 936be31
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions bootstrap/kubeadm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ func InitFlags(fs *pflag.FlagSet) {
}

func main() {
//nolint:staticcheck
rand.Seed(time.Now().UnixNano())

InitFlags(pflag.CommandLine)
Expand Down
1 change: 1 addition & 0 deletions controlplane/kubeadm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ func InitFlags(fs *pflag.FlagSet) {
feature.MutableGates.AddFlag(fs)
}
func main() {
//nolint:staticcheck
rand.Seed(time.Now().UnixNano())

InitFlags(pflag.CommandLine)
Expand Down
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ func InitFlags(fs *pflag.FlagSet) {
}

func main() {
//nolint:staticcheck
rand.Seed(time.Now().UnixNano())

InitFlags(pflag.CommandLine)
Expand Down
1 change: 1 addition & 0 deletions test/infrastructure/docker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ func initFlags(fs *pflag.FlagSet) {
}

func main() {
//nolint:staticcheck
rand.Seed(time.Now().UnixNano())
if _, err := os.ReadDir("/tmp/"); err != nil {
setupLog.Error(err, "unable to start manager")
Expand Down

0 comments on commit 936be31

Please sign in to comment.