Skip to content

Commit

Permalink
replace math/rand with the rand pkg from k8s.io/apimachinery
Browse files Browse the repository at this point in the history
Signed-off-by: Tariq Ibrahim <[email protected]>
  • Loading branch information
tariq1890 committed Apr 11, 2024
1 parent dc5a4fe commit 295d2b0
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 10 deletions.
10 changes: 1 addition & 9 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
run:
deadline: 10m
timeout: 10m

linters:
enable:
Expand All @@ -20,11 +20,3 @@ linters:
linters-settings:
goimports:
local-prefixes: github.com/NVIDIA/mig-parted

issues:
exclude-rules:
# We use math/rand instead of crypto/rand for unique names in config tests.
- path: pkg/mig/config/config_test.go
linters:
- gosec
text: "G404"
2 changes: 1 addition & 1 deletion pkg/mig/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ package config

import (
"fmt"
"math/rand"
"testing"

"github.com/stretchr/testify/require"
"k8s.io/apimachinery/pkg/util/rand"

"github.com/NVIDIA/mig-parted/internal/nvlib"
"github.com/NVIDIA/mig-parted/internal/nvml"
Expand Down
127 changes: 127 additions & 0 deletions vendor/k8s.io/apimachinery/pkg/util/rand/rand.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ k8s.io/apimachinery/pkg/util/json
k8s.io/apimachinery/pkg/util/managedfields
k8s.io/apimachinery/pkg/util/naming
k8s.io/apimachinery/pkg/util/net
k8s.io/apimachinery/pkg/util/rand
k8s.io/apimachinery/pkg/util/runtime
k8s.io/apimachinery/pkg/util/sets
k8s.io/apimachinery/pkg/util/validation
Expand Down

0 comments on commit 295d2b0

Please sign in to comment.