Skip to content

Commit

Permalink
Update to golangci-lint 1.51.0
Browse files Browse the repository at this point in the history
This is required for support of Go 1.20.

Also avoid a call to math/rand.Read, which is deprecated in Go 1.20.

Signed-off-by: Miloslav Trmač <[email protected]>
  • Loading branch information
mtrmac committed Feb 6, 2023
1 parent 7af4432 commit 521155f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ tools: .install.gitvalidation .install.golangci-lint .install.golint

.install.golangci-lint:
if [ ! -x "$(GOBIN)/golangci-lint" ]; then \
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(GOBIN) v1.49.0; \
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(GOBIN) v1.51.0; \
fi

.install.golint:
Expand Down
3 changes: 2 additions & 1 deletion internal/iolimits/iolimits_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
)

func TestReadAtMost(t *testing.T) {
rng := rand.New(rand.NewSource(0))
for _, c := range []struct {
input, limit int
shouldSucceed bool
Expand All @@ -23,7 +24,7 @@ func TestReadAtMost(t *testing.T) {
{bytes.MinRead*5 + 1, bytes.MinRead * 5, false},
} {
input := make([]byte, c.input)
_, err := rand.Read(input)
_, err := rng.Read(input)
require.NoError(t, err)
result, err := ReadAtMost(bytes.NewReader(input), c.limit)
if c.shouldSucceed {
Expand Down

0 comments on commit 521155f

Please sign in to comment.