Skip to content

Commit

Permalink
*: remove deprecated rand.Seed calls
Browse files Browse the repository at this point in the history
Ref: https://go.dev/doc/go1.20#math/rand

Signed-off-by: Hidde Beydals <[email protected]>
  • Loading branch information
hiddeco committed Aug 4, 2023
1 parent f775906 commit d998987
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
1 change: 0 additions & 1 deletion git/internal/e2e/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ func createSSHIdentitySecret(repoURL url.URL) (map[string][]byte, error) {
}

func randStringRunes(n int) string {
rand.Seed(time.Now().UnixNano())
b := make([]rune, n)
for i := range b {
b[i] = letterRunes[rand.Intn(len(letterRunes))]
Expand Down
4 changes: 0 additions & 4 deletions oci/client/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ var (
dockerReg string
)

func init() {
rand.Seed(time.Now().UnixNano())
}

func setupRegistryServer(ctx context.Context) error {
// Registry config
config := &configuration.Configuration{}
Expand Down
4 changes: 0 additions & 4 deletions oci/tests/integration/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,6 @@ type ProviderConfig struct {
pushAppTestImages pushTestImages
}

func init() {
rand.Seed(time.Now().UnixNano())
}

var letterRunes = []rune("abcdefghijklmnopqrstuvwxyz1234567890")

func randStringRunes(n int) string {
Expand Down

0 comments on commit d998987

Please sign in to comment.