Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace math/rand with the rand pkg from k8s.io/apimachinery #52

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change seems reasonable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll file another PR for it


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
Loading