Skip to content

Commit

Permalink
chore: update golangci-lint to v1.51.0
Browse files Browse the repository at this point in the history
  • Loading branch information
simlecode committed Nov 16, 2023
1 parent e662afb commit 5c09581
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ commands:
executors:
golang:
docker:
- image: cimg/go:1.19.10
- image: cimg/go:1.20.11

jobs:
test_all:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/baisc_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.50.0
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.51.0
golangci-lint run --timeout 10m
- name: Compatible all
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/common_go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.50.0
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.51.0
golangci-lint run --timeout 10m
- name: Detect changes
Expand Down
2 changes: 1 addition & 1 deletion pkg/messagepool/block_proba_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestBlockProbability(t *testing.T) {
func TestWinnerProba(t *testing.T) {
tf.UnitTest(t)

rand.Seed(time.Now().UnixNano())
rand.New(rand.NewSource(time.Now().UnixNano()))
const N = 1000000
winnerProba := noWinnersProb()
sum := 0
Expand Down
2 changes: 1 addition & 1 deletion pkg/repo/fskeystore/fskeystore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package fskeystore

import (
"bytes"
"crypto/rand"
"fmt"
"math/rand"
"os"
"path/filepath"
"sort"
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/fr32/fr32_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package fr32_test

import (
"bytes"
"crypto/rand"
"io"
"math/rand"
"os"
"testing"

Expand Down
2 changes: 1 addition & 1 deletion venus-shared/testutil/value_provider_primitive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

func getRand() *rand.Rand {
seed := time.Now().UnixNano()
rand.Seed(seed)
rand.New(rand.NewSource(seed))
return rand.New(rand.NewSource(seed))
}

Expand Down

0 comments on commit 5c09581

Please sign in to comment.