File tree Expand file tree Collapse file tree 6 files changed +8
-12
lines changed Expand file tree Collapse file tree 6 files changed +8
-12
lines changed Original file line number Diff line number Diff line change 16
16
steps :
17
17
- uses : actions/setup-go@v4
18
18
with :
19
- go-version : ' 1.19 '
19
+ go-version : ' 1.20 '
20
20
cache : false
21
21
- uses : actions/checkout@v3
22
22
- name : golangci-lint
Original file line number Diff line number Diff line change @@ -59,9 +59,9 @@ linters-settings:
59
59
- pkg : sigs.k8s.io/controller-runtime
60
60
alias : ctrl
61
61
staticcheck :
62
- go : " 1.19 "
62
+ go : " 1.20 "
63
63
stylecheck :
64
- go : " 1.19 "
64
+ go : " 1.20 "
65
65
depguard :
66
66
include-go-root : true
67
67
packages :
Original file line number Diff line number Diff line change 1
1
module sigs.k8s.io/controller-runtime
2
2
3
- go 1.19
3
+ go 1.20
4
4
5
5
require (
6
6
github.com/evanphx/json-patch/v5 v5.6.0
Original file line number Diff line number Diff line change @@ -38,10 +38,6 @@ import (
38
38
"sigs.k8s.io/controller-runtime/pkg/client/apiutil"
39
39
)
40
40
41
- func init () {
42
- rand .Seed (time .Now ().UnixNano ())
43
- }
44
-
45
41
// InformersOpts configures an InformerMap.
46
42
type InformersOpts struct {
47
43
HTTPClient * http.Client
Original file line number Diff line number Diff line change @@ -20,9 +20,9 @@ import (
20
20
"archive/tar"
21
21
"bytes"
22
22
"compress/gzip"
23
+ "crypto/rand"
23
24
"io"
24
25
"io/fs"
25
- "math/rand"
26
26
"path/filepath"
27
27
28
28
. "github.com/onsi/ginkgo/v2"
@@ -214,7 +214,7 @@ func makeFakeArchive(magic string) io.Reader {
214
214
copy (chunk [:], magic )
215
215
copy (chunk [len (magic ):], fileName )
216
216
start := len (magic ) + len (fileName )
217
- if _ , err := rand .Read (chunk [start :]); err != nil { //nolint:gosec
217
+ if _ , err := rand .Read (chunk [start :]); err != nil {
218
218
panic (err )
219
219
}
220
220
Original file line number Diff line number Diff line change 8
8
"bytes"
9
9
"compress/gzip"
10
10
"crypto/md5" //nolint:gosec
11
+ "crypto/rand"
11
12
"encoding/base64"
12
- "math/rand"
13
13
"net/http"
14
14
"path/filepath"
15
15
@@ -105,7 +105,7 @@ func makeContents(names []string) []item {
105
105
for i , name := range names {
106
106
var chunk [1024 * 48 ]byte // 1.5 times our chunk read size in GetVersion
107
107
copy (chunk [:], name )
108
- if _ , err := rand .Read (chunk [len (name ):]); err != nil { //nolint:gosec
108
+ if _ , err := rand .Read (chunk [len (name ):]); err != nil {
109
109
panic (err )
110
110
}
111
111
res [i ] = verWith (name , chunk [:])
You can’t perform that action at this time.
0 commit comments