File tree Expand file tree Collapse file tree 12 files changed +57
-22
lines changed Expand file tree Collapse file tree 12 files changed +57
-22
lines changed Original file line number Diff line number Diff line change 2121 steps :
2222 - uses : actions/checkout@v4
2323 - name : golangci-lint
24- uses : golangci/golangci-lint-action@v6.5.2
24+ uses : golangci/golangci-lint-action@v7.0.0
2525 with :
26- verify : false # disable verifying the configuration since golangci is currently introducing breaking changes in the configuration
26+ verify : true
2727
Original file line number Diff line number Diff line change 1+ version : " 2"
12run :
23 timeout : 5m
34 tests : false
5+ linters :
6+ settings :
7+ staticcheck :
8+ checks :
9+ - all
10+ # Incorrect or missing package comment.
11+ # https://staticcheck.dev/docs/checks/#ST1000
12+ - -ST1000
13+ # Omit embedded fields from selector expression.
14+ # https://staticcheck.dev/docs/checks/#QF1008
15+ - -QF1008
16+ - -ST1003
17+ exclusions :
18+ generated : lax
19+ presets :
20+ - comments
21+ - common-false-positives
22+ - legacy
23+ - std-error-handling
24+ paths :
25+ - third_party$
26+ - builtin$
27+ - examples$
28+ formatters :
29+ exclusions :
30+ generated : lax
31+ paths :
32+ - third_party$
33+ - builtin$
34+ - examples$
Original file line number Diff line number Diff line change @@ -1412,7 +1412,8 @@ func (cmd *MapStringSliceInterfaceCmd) readReply(rd *proto.Reader) (err error) {
14121412
14131413 cmd .val = make (map [string ][]interface {})
14141414
1415- if readType == proto .RespMap {
1415+ switch readType {
1416+ case proto .RespMap :
14161417 n , err := rd .ReadMapLen ()
14171418 if err != nil {
14181419 return err
@@ -1435,7 +1436,7 @@ func (cmd *MapStringSliceInterfaceCmd) readReply(rd *proto.Reader) (err error) {
14351436 cmd.val [k ][j ] = value
14361437 }
14371438 }
1438- } else if readType == proto .RespArray {
1439+ case proto .RespArray :
14391440 // RESP2 response
14401441 n , err := rd .ReadArrayLen ()
14411442 if err != nil {
Original file line number Diff line number Diff line change @@ -19,6 +19,6 @@ require (
1919)
2020
2121retract (
22- v9.5.3 // This version was accidentally released.
2322 v9.7.2 // This version was accidentally released.
23+ v9.5.3 // This version was accidentally released.
2424)
Original file line number Diff line number Diff line change @@ -16,6 +16,6 @@ require (
1616)
1717
1818retract (
19- v9.5.3 // This version was accidentally released.
2019 v9.7.2 // This version was accidentally released.
20+ v9.5.3 // This version was accidentally released.
2121)
Original file line number Diff line number Diff line change @@ -24,6 +24,6 @@ require (
2424)
2525
2626retract (
27- v9.5.3 // This version was accidentally released.
2827 v9.7.2 // This version was accidentally released.
28+ v9.5.3 // This version was accidentally released.
2929)
Original file line number Diff line number Diff line change @@ -23,6 +23,6 @@ require (
2323)
2424
2525retract (
26- v9.5.3 // This version was accidentally released.
2726 v9.7.2 // This version was accidentally released.
27+ v9.5.3 // This version was accidentally released.
2828)
Original file line number Diff line number Diff line change @@ -214,9 +214,10 @@ func (opt *Options) init() {
214214 opt .ConnMaxIdleTime = 30 * time .Minute
215215 }
216216
217- if opt .MaxRetries == - 1 {
217+ switch opt .MaxRetries {
218+ case - 1 :
218219 opt .MaxRetries = 0
219- } else if opt . MaxRetries == 0 {
220+ case 0 :
220221 opt .MaxRetries = 3
221222 }
222223 switch opt .MinRetryBackoff {
Original file line number Diff line number Diff line change @@ -111,9 +111,10 @@ type ClusterOptions struct {
111111}
112112
113113func (opt * ClusterOptions ) init () {
114- if opt .MaxRedirects == - 1 {
114+ switch opt .MaxRedirects {
115+ case - 1 :
115116 opt .MaxRedirects = 0
116- } else if opt . MaxRedirects == 0 {
117+ case 0 :
117118 opt .MaxRedirects = 3
118119 }
119120
Original file line number Diff line number Diff line change @@ -128,9 +128,10 @@ func (opt *RingOptions) init() {
128128 opt .NewConsistentHash = newRendezvous
129129 }
130130
131- if opt .MaxRetries == - 1 {
131+ switch opt .MaxRetries {
132+ case - 1 :
132133 opt .MaxRetries = 0
133- } else if opt . MaxRetries == 0 {
134+ case 0 :
134135 opt .MaxRetries = 3
135136 }
136137 switch opt .MinRetryBackoff {
You can’t perform that action at this time.
0 commit comments