Skip to content

Commit 727f75e

Browse files
committed
fix golint
fix golint
1 parent 7b52494 commit 727f75e

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

.github/workflows/static.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ jobs:
1616
uses: golangci/golangci-lint-action@v6
1717
with:
1818
version: v1.64
19-
args: -E=gofmt,unused,ineffassign,revive,misspell,exportloopref,asciicheck,bodyclose,contextcheck,depguard,dogsled,durationcheck,errname,forbidigo -D=staticcheck --timeout=30m0s
19+
args: -E=gofmt,unused,ineffassign,revive,misspell,copyloopvar,asciicheck,bodyclose,contextcheck,dogsled,durationcheck,errname,forbidigo -D=staticcheck --timeout=30m0s

pkg/csi-common/utils.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,21 @@ func NewVolumeCapabilityAccessMode(mode csi.VolumeCapability_AccessMode_Mode) *c
4242
return &csi.VolumeCapability_AccessMode{Mode: mode}
4343
}
4444

45-
func NewControllerServiceCapability(cap csi.ControllerServiceCapability_RPC_Type) *csi.ControllerServiceCapability {
45+
func NewControllerServiceCapability(c csi.ControllerServiceCapability_RPC_Type) *csi.ControllerServiceCapability {
4646
return &csi.ControllerServiceCapability{
4747
Type: &csi.ControllerServiceCapability_Rpc{
4848
Rpc: &csi.ControllerServiceCapability_RPC{
49-
Type: cap,
49+
Type: c,
5050
},
5151
},
5252
}
5353
}
5454

55-
func NewNodeServiceCapability(cap csi.NodeServiceCapability_RPC_Type) *csi.NodeServiceCapability {
55+
func NewNodeServiceCapability(c csi.NodeServiceCapability_RPC_Type) *csi.NodeServiceCapability {
5656
return &csi.NodeServiceCapability{
5757
Type: &csi.NodeServiceCapability_Rpc{
5858
Rpc: &csi.NodeServiceCapability_RPC{
59-
Type: cap,
59+
Type: c,
6060
},
6161
},
6262
}

pkg/smb/controllerserver_test.go

-3
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ func TestCreateVolume(t *testing.T) {
181181
}
182182

183183
for _, test := range cases {
184-
test := test //pin
185184
t.Run(test.name, func(t *testing.T) {
186185
if test.skipOnWindows && runtime.GOOS == "windows" {
187186
return
@@ -265,7 +264,6 @@ func TestDeleteVolume(t *testing.T) {
265264
},
266265
}
267266
for _, test := range cases {
268-
test := test //pin
269267
t.Run(test.desc, func(t *testing.T) {
270268
// Setup
271269
_ = os.MkdirAll(filepath.Join(d.workingMountDir, testCSIVolume), os.ModePerm)
@@ -562,7 +560,6 @@ func TestGetSmbVolFromID(t *testing.T) {
562560
},
563561
}
564562
for _, test := range cases {
565-
test := test //pin
566563
t.Run(test.desc, func(t *testing.T) {
567564
smbVolume, err := getSmbVolFromID(test.volumeID)
568565

0 commit comments

Comments
 (0)