Skip to content

Commit 71885c9

Browse files
authored
Merge pull request #2279 from vincepri/go120
✨ Update Go to 1.20
2 parents d989e66 + 93aa80f commit 71885c9

File tree

6 files changed

+8
-12
lines changed

6 files changed

+8
-12
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
steps:
1717
- uses: actions/setup-go@v4
1818
with:
19-
go-version: '1.19'
19+
go-version: '1.20'
2020
cache: false
2121
- uses: actions/checkout@v3
2222
- name: golangci-lint

.golangci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ linters-settings:
5959
- pkg: sigs.k8s.io/controller-runtime
6060
alias: ctrl
6161
staticcheck:
62-
go: "1.19"
62+
go: "1.20"
6363
stylecheck:
64-
go: "1.19"
64+
go: "1.20"
6565
depguard:
6666
include-go-root: true
6767
packages:

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module sigs.k8s.io/controller-runtime
22

3-
go 1.19
3+
go 1.20
44

55
require (
66
github.com/evanphx/json-patch/v5 v5.6.0

pkg/cache/internal/informers.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ import (
3838
"sigs.k8s.io/controller-runtime/pkg/client/apiutil"
3939
)
4040

41-
func init() {
42-
rand.Seed(time.Now().UnixNano())
43-
}
44-
4541
// InformersOpts configures an InformerMap.
4642
type InformersOpts struct {
4743
HTTPClient *http.Client

tools/setup-envtest/store/store_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ import (
2020
"archive/tar"
2121
"bytes"
2222
"compress/gzip"
23+
"crypto/rand"
2324
"io"
2425
"io/fs"
25-
"math/rand"
2626
"path/filepath"
2727

2828
. "github.com/onsi/ginkgo/v2"
@@ -214,7 +214,7 @@ func makeFakeArchive(magic string) io.Reader {
214214
copy(chunk[:], magic)
215215
copy(chunk[len(magic):], fileName)
216216
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 {
218218
panic(err)
219219
}
220220

tools/setup-envtest/workflows/workflows_testutils_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import (
88
"bytes"
99
"compress/gzip"
1010
"crypto/md5" //nolint:gosec
11+
"crypto/rand"
1112
"encoding/base64"
12-
"math/rand"
1313
"net/http"
1414
"path/filepath"
1515

@@ -105,7 +105,7 @@ func makeContents(names []string) []item {
105105
for i, name := range names {
106106
var chunk [1024 * 48]byte // 1.5 times our chunk read size in GetVersion
107107
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 {
109109
panic(err)
110110
}
111111
res[i] = verWith(name, chunk[:])

0 commit comments

Comments
 (0)