Skip to content

Commit 7bfc0f7

Browse files
committed
cmd: remove deprecated call to rand.Seed
with go 1.20 it is no longer necessary to seed the generator at program startup. see https://pkg.go.dev/math/rand#Seed for details.
1 parent 693312f commit 7bfc0f7

File tree

1 file changed

+0
-3
lines changed
  • cmd/cluster-image-registry-operator

1 file changed

+0
-3
lines changed

cmd/cluster-image-registry-operator/main.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ import (
44
"context"
55
"flag"
66
"log"
7-
"math/rand"
87
"os"
98
"runtime"
10-
"time"
119

1210
"github.com/spf13/cobra"
1311

@@ -63,7 +61,6 @@ func main() {
6361
func(ctx context.Context, cctx *controllercmd.ControllerContext) error {
6462
printVersion()
6563
klog.Infof("Watching files %v...", filesToWatch)
66-
rand.Seed(time.Now().UnixNano())
6764
go metrics.RunServer(metricsPort)
6865
return operator.RunOperator(ctx, cctx.KubeConfig)
6966
},

0 commit comments

Comments
 (0)