Skip to content

Commit b89717b

Browse files
committed
test: update golint version
1 parent f904f6a commit b89717b

File tree

4 files changed

+22
-22
lines changed

4 files changed

+22
-22
lines changed

.github/workflows/static.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ jobs:
1515
- name: Run linter
1616
uses: golangci/golangci-lint-action@v6
1717
with:
18-
version: v1.60
19-
args: -E=gofmt,unused,ineffassign,revive,misspell,asciicheck,bodyclose,depguard,dogsled,durationcheck,errname,forbidigo -D=staticcheck --timeout=30m0s
18+
version: v1.64
19+
args: -E=gofmt,unused,ineffassign,revive,misspell,asciicheck,bodyclose,dogsled,durationcheck,errname,forbidigo -D=staticcheck --timeout=30m0s

pkg/csi-common/driver.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ func (d *CSIDriver) ValidateControllerServiceRequest(c csi.ControllerServiceCapa
6565
return nil
6666
}
6767

68-
for _, cap := range d.Cap {
69-
if c == cap.GetRpc().GetType() {
68+
for _, capability := range d.Cap {
69+
if c == capability.GetRpc().GetType() {
7070
return nil
7171
}
7272
}

pkg/csi-common/utils.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,21 @@ func NewVolumeCapabilityAccessMode(mode csi.VolumeCapability_AccessMode_Mode) *c
7070
return &csi.VolumeCapability_AccessMode{Mode: mode}
7171
}
7272

73-
func NewControllerServiceCapability(cap csi.ControllerServiceCapability_RPC_Type) *csi.ControllerServiceCapability {
73+
func NewControllerServiceCapability(c csi.ControllerServiceCapability_RPC_Type) *csi.ControllerServiceCapability {
7474
return &csi.ControllerServiceCapability{
7575
Type: &csi.ControllerServiceCapability_Rpc{
7676
Rpc: &csi.ControllerServiceCapability_RPC{
77-
Type: cap,
77+
Type: c,
7878
},
7979
},
8080
}
8181
}
8282

83-
func NewNodeServiceCapability(cap csi.NodeServiceCapability_RPC_Type) *csi.NodeServiceCapability {
83+
func NewNodeServiceCapability(c csi.NodeServiceCapability_RPC_Type) *csi.NodeServiceCapability {
8484
return &csi.NodeServiceCapability{
8585
Type: &csi.NodeServiceCapability_Rpc{
8686
Rpc: &csi.NodeServiceCapability_RPC{
87-
Type: cap,
87+
Type: c,
8888
},
8989
},
9090
}

pkg/csi-common/utils_test.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -174,52 +174,52 @@ func TestLogGRPC(t *testing.T) {
174174

175175
func TestNewControllerServiceCapability(t *testing.T) {
176176
tests := []struct {
177-
cap csi.ControllerServiceCapability_RPC_Type
177+
c csi.ControllerServiceCapability_RPC_Type
178178
}{
179179
{
180-
cap: csi.ControllerServiceCapability_RPC_UNKNOWN,
180+
c: csi.ControllerServiceCapability_RPC_UNKNOWN,
181181
},
182182
{
183-
cap: csi.ControllerServiceCapability_RPC_CREATE_DELETE_VOLUME,
183+
c: csi.ControllerServiceCapability_RPC_CREATE_DELETE_VOLUME,
184184
},
185185
{
186-
cap: csi.ControllerServiceCapability_RPC_PUBLISH_UNPUBLISH_VOLUME,
186+
c: csi.ControllerServiceCapability_RPC_PUBLISH_UNPUBLISH_VOLUME,
187187
},
188188
{
189-
cap: csi.ControllerServiceCapability_RPC_LIST_VOLUMES,
189+
c: csi.ControllerServiceCapability_RPC_LIST_VOLUMES,
190190
},
191191
{
192-
cap: csi.ControllerServiceCapability_RPC_GET_CAPACITY,
192+
c: csi.ControllerServiceCapability_RPC_GET_CAPACITY,
193193
},
194194
{
195-
cap: csi.ControllerServiceCapability_RPC_CLONE_VOLUME,
195+
c: csi.ControllerServiceCapability_RPC_CLONE_VOLUME,
196196
},
197197
}
198198
for _, test := range tests {
199-
resp := NewControllerServiceCapability(test.cap)
199+
resp := NewControllerServiceCapability(test.c)
200200
assert.NotNil(t, resp)
201201
}
202202
}
203203

204204
func TestNewNodeServiceCapability(t *testing.T) {
205205
tests := []struct {
206-
cap csi.NodeServiceCapability_RPC_Type
206+
c csi.NodeServiceCapability_RPC_Type
207207
}{
208208
{
209-
cap: csi.NodeServiceCapability_RPC_UNKNOWN,
209+
c: csi.NodeServiceCapability_RPC_UNKNOWN,
210210
},
211211
{
212-
cap: csi.NodeServiceCapability_RPC_STAGE_UNSTAGE_VOLUME,
212+
c: csi.NodeServiceCapability_RPC_STAGE_UNSTAGE_VOLUME,
213213
},
214214
{
215-
cap: csi.NodeServiceCapability_RPC_GET_VOLUME_STATS,
215+
c: csi.NodeServiceCapability_RPC_GET_VOLUME_STATS,
216216
},
217217
{
218-
cap: csi.NodeServiceCapability_RPC_EXPAND_VOLUME,
218+
c: csi.NodeServiceCapability_RPC_EXPAND_VOLUME,
219219
},
220220
}
221221
for _, test := range tests {
222-
resp := NewNodeServiceCapability(test.cap)
222+
resp := NewNodeServiceCapability(test.c)
223223
assert.NotNil(t, resp)
224224
}
225225
}

0 commit comments

Comments
 (0)