Skip to content

Commit

Permalink
Remove unnecessary random seed initialization.
Browse files Browse the repository at this point in the history
Signed-off-by: xuezhaojun <[email protected]>
  • Loading branch information
xuezhaojun committed Feb 1, 2025
1 parent b6c2a84 commit 88067f5
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 20 deletions.
4 changes: 0 additions & 4 deletions cmd/addon/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ package main
import (
goflag "flag"
"fmt"
"math/rand"
"os"
"time"

"github.com/spf13/cobra"
"github.com/spf13/pflag"
Expand All @@ -17,8 +15,6 @@ import (
)

func main() {
rand.Seed(time.Now().UTC().UnixNano())

pflag.CommandLine.SetNormalizeFunc(utilflag.WordSepNormalizeFunc)
pflag.CommandLine.AddGoFlagSet(goflag.CommandLine)

Expand Down
4 changes: 0 additions & 4 deletions cmd/placement/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ package main
import (
goflag "flag"
"fmt"
"math/rand"
"os"
"time"

"github.com/spf13/cobra"
"github.com/spf13/pflag"
Expand All @@ -17,8 +15,6 @@ import (
)

func main() {
rand.Seed(time.Now().UTC().UnixNano())

pflag.CommandLine.SetNormalizeFunc(utilflag.WordSepNormalizeFunc)
pflag.CommandLine.AddGoFlagSet(goflag.CommandLine)

Expand Down
4 changes: 0 additions & 4 deletions cmd/registration-operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ package main
import (
goflag "flag"
"fmt"
"math/rand"
"os"
"time"

"github.com/spf13/cobra"
"github.com/spf13/pflag"
Expand All @@ -18,8 +16,6 @@ import (
)

func main() {
rand.Seed(time.Now().UTC().UnixNano())

pflag.CommandLine.SetNormalizeFunc(utilflag.WordSepNormalizeFunc)
pflag.CommandLine.AddGoFlagSet(goflag.CommandLine)

Expand Down
4 changes: 0 additions & 4 deletions cmd/registration/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ package main
import (
goflag "flag"
"fmt"
"math/rand"
"os"
"time"

"github.com/spf13/cobra"
"github.com/spf13/pflag"
Expand All @@ -26,8 +24,6 @@ import (
// registration API and the spoke agent.

func main() {
rand.Seed(time.Now().UTC().UnixNano())

pflag.CommandLine.SetNormalizeFunc(utilflag.WordSepNormalizeFunc)
pflag.CommandLine.AddGoFlagSet(goflag.CommandLine)

Expand Down
4 changes: 0 additions & 4 deletions cmd/work/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ package main
import (
goflag "flag"
"fmt"
"math/rand"
"os"
"time"

"github.com/spf13/cobra"
"github.com/spf13/pflag"
Expand All @@ -23,8 +21,6 @@ import (
)

func main() {
rand.Seed(time.Now().UTC().UnixNano())

pflag.CommandLine.SetNormalizeFunc(utilflag.WordSepNormalizeFunc)
pflag.CommandLine.AddGoFlagSet(goflag.CommandLine)

Expand Down

0 comments on commit 88067f5

Please sign in to comment.