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 21
21
steps :
22
22
- uses : actions/checkout@v4
23
23
- name : golangci-lint
24
- uses : golangci/golangci-lint-action@v6.5.2
24
+ uses : golangci/golangci-lint-action@v7.0.0
25
25
with :
26
- verify : false # disable verifying the configuration since golangci is currently introducing breaking changes in the configuration
26
+ verify : true
27
27
Original file line number Diff line number Diff line change
1
+ version : " 2"
1
2
run :
2
3
timeout : 5m
3
4
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) {
1412
1412
1413
1413
cmd .val = make (map [string ][]interface {})
1414
1414
1415
- if readType == proto .RespMap {
1415
+ switch readType {
1416
+ case proto .RespMap :
1416
1417
n , err := rd .ReadMapLen ()
1417
1418
if err != nil {
1418
1419
return err
@@ -1435,7 +1436,7 @@ func (cmd *MapStringSliceInterfaceCmd) readReply(rd *proto.Reader) (err error) {
1435
1436
cmd.val [k ][j ] = value
1436
1437
}
1437
1438
}
1438
- } else if readType == proto .RespArray {
1439
+ case proto .RespArray :
1439
1440
// RESP2 response
1440
1441
n , err := rd .ReadArrayLen ()
1441
1442
if err != nil {
Original file line number Diff line number Diff line change @@ -19,6 +19,6 @@ require (
19
19
)
20
20
21
21
retract (
22
- v9.5.3 // This version was accidentally released.
23
22
v9.7.2 // This version was accidentally released.
23
+ v9.5.3 // This version was accidentally released.
24
24
)
Original file line number Diff line number Diff line change @@ -16,6 +16,6 @@ require (
16
16
)
17
17
18
18
retract (
19
- v9.5.3 // This version was accidentally released.
20
19
v9.7.2 // This version was accidentally released.
20
+ v9.5.3 // This version was accidentally released.
21
21
)
Original file line number Diff line number Diff line change @@ -24,6 +24,6 @@ require (
24
24
)
25
25
26
26
retract (
27
- v9.5.3 // This version was accidentally released.
28
27
v9.7.2 // This version was accidentally released.
28
+ v9.5.3 // This version was accidentally released.
29
29
)
Original file line number Diff line number Diff line change @@ -23,6 +23,6 @@ require (
23
23
)
24
24
25
25
retract (
26
- v9.5.3 // This version was accidentally released.
27
26
v9.7.2 // This version was accidentally released.
27
+ v9.5.3 // This version was accidentally released.
28
28
)
Original file line number Diff line number Diff line change @@ -214,9 +214,10 @@ func (opt *Options) init() {
214
214
opt .ConnMaxIdleTime = 30 * time .Minute
215
215
}
216
216
217
- if opt .MaxRetries == - 1 {
217
+ switch opt .MaxRetries {
218
+ case - 1 :
218
219
opt .MaxRetries = 0
219
- } else if opt . MaxRetries == 0 {
220
+ case 0 :
220
221
opt .MaxRetries = 3
221
222
}
222
223
switch opt .MinRetryBackoff {
Original file line number Diff line number Diff line change @@ -111,9 +111,10 @@ type ClusterOptions struct {
111
111
}
112
112
113
113
func (opt * ClusterOptions ) init () {
114
- if opt .MaxRedirects == - 1 {
114
+ switch opt .MaxRedirects {
115
+ case - 1 :
115
116
opt .MaxRedirects = 0
116
- } else if opt . MaxRedirects == 0 {
117
+ case 0 :
117
118
opt .MaxRedirects = 3
118
119
}
119
120
Original file line number Diff line number Diff line change @@ -128,9 +128,10 @@ func (opt *RingOptions) init() {
128
128
opt .NewConsistentHash = newRendezvous
129
129
}
130
130
131
- if opt .MaxRetries == - 1 {
131
+ switch opt .MaxRetries {
132
+ case - 1 :
132
133
opt .MaxRetries = 0
133
- } else if opt . MaxRetries == 0 {
134
+ case 0 :
134
135
opt .MaxRetries = 3
135
136
}
136
137
switch opt .MinRetryBackoff {
You can’t perform that action at this time.
0 commit comments