Skip to content

Commit

Permalink
chore: ci: update golangci-lint to v1.57.2
Browse files Browse the repository at this point in the history
  • Loading branch information
simlecode committed Apr 2, 2024
1 parent 99fd08b commit 0c02f99
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
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.51.0
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.57.2
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 @@ -56,7 +56,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.51.0
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.57.2
golangci-lint run --timeout 10m
- name: Detect changes
Expand Down
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ linters:
- govet
- misspell
- goconst
- revive
- errcheck
- unconvert
- staticcheck
Expand Down
5 changes: 1 addition & 4 deletions pkg/shardedmutex/shardedmutex.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@ import (
"sync"
)

const cacheline = 64

// padding a mutex to a cacheline improves performance as the cachelines are not contested
// name old time/op new time/op delta
// Locks-8 74.6ns ± 7% 12.3ns ± 2% -83.54% (p=0.000 n=20+18)
type paddedMutex struct {
mt sync.Mutex
pad [cacheline - 8]uint8 //nolint:unused
mt sync.Mutex
}

type ShardedMutex struct { //nolint:revive
Expand Down

0 comments on commit 0c02f99

Please sign in to comment.