Skip to content

✨ Update Go to 1.20 #2279

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

Merged
merged 1 commit into from
Apr 17, 2023
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: '1.19'
go-version: '1.20'
cache: false
- uses: actions/checkout@v3
- name: golangci-lint
Expand Down
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ linters-settings:
- pkg: sigs.k8s.io/controller-runtime
alias: ctrl
staticcheck:
go: "1.19"
go: "1.20"
stylecheck:
go: "1.19"
go: "1.20"
depguard:
include-go-root: true
packages:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module sigs.k8s.io/controller-runtime

go 1.19
go 1.20

require (
github.com/evanphx/json-patch/v5 v5.6.0
Expand Down
4 changes: 0 additions & 4 deletions pkg/cache/internal/informers.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client/apiutil"
)

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

// InformersOpts configures an InformerMap.
type InformersOpts struct {
HTTPClient *http.Client
Expand Down
4 changes: 2 additions & 2 deletions tools/setup-envtest/store/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
"archive/tar"
"bytes"
"compress/gzip"
"crypto/rand"
"io"
"io/fs"
"math/rand"
"path/filepath"

. "github.com/onsi/ginkgo/v2"
Expand Down Expand Up @@ -214,7 +214,7 @@ func makeFakeArchive(magic string) io.Reader {
copy(chunk[:], magic)
copy(chunk[len(magic):], fileName)
start := len(magic) + len(fileName)
if _, err := rand.Read(chunk[start:]); err != nil { //nolint:gosec
if _, err := rand.Read(chunk[start:]); err != nil {
panic(err)
}

Expand Down
4 changes: 2 additions & 2 deletions tools/setup-envtest/workflows/workflows_testutils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"bytes"
"compress/gzip"
"crypto/md5" //nolint:gosec
"crypto/rand"
"encoding/base64"
"math/rand"
"net/http"
"path/filepath"

Expand Down Expand Up @@ -105,7 +105,7 @@ func makeContents(names []string) []item {
for i, name := range names {
var chunk [1024 * 48]byte // 1.5 times our chunk read size in GetVersion
copy(chunk[:], name)
if _, err := rand.Read(chunk[len(name):]); err != nil { //nolint:gosec
if _, err := rand.Read(chunk[len(name):]); err != nil {
panic(err)
}
res[i] = verWith(name, chunk[:])
Expand Down