Skip to content

Commit 6be1803

Browse files
authored
Merge pull request #834 from andyzhangx/fix-golint
tes: fix golint action failure
2 parents 66e118e + 21881bc commit 6be1803

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

.github/workflows/static.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ jobs:
77
name: Go Lint
88
runs-on: ubuntu-latest
99
steps:
10-
- name: Checkout code
11-
uses: actions/checkout@master
10+
- name: Set up Go 1.x
11+
uses: actions/setup-go@v3
12+
with:
13+
go-version: ^1.19
14+
- uses: actions/checkout@master
1215
- name: Run linter
13-
uses: golangci/golangci-lint-action@v2
16+
uses: golangci/golangci-lint-action@v3
1417
with:
15-
version: v1.45
16-
# https://golangci-lint.run/usage/linters/
17-
args: -E=gofmt,deadcode,unused,varcheck,ineffassign,revive,misspell,exportloopref,asciicheck,bodyclose,depguard,dogsled,dupl,durationcheck,errname,errorlint,forbidigo -D=staticcheck --timeout=30m0s
18+
version: v1.51
19+
args: -E=gofmt,deadcode,unused,varcheck,ineffassign,revive,misspell,exportloopref,asciicheck,bodyclose,depguard,dogsled,durationcheck,errname,forbidigo -D=staticcheck --timeout=30m0s

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module sigs.k8s.io/blob-csi-driver
22

3-
go 1.18
3+
go 1.19
44

55
require (
66
github.com/Azure/azure-sdk-for-go v67.3.0+incompatible

pkg/blob/controllerserver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest)
182182

183183
if pointer.BoolDeref(enableBlobVersioning, false) {
184184
if protocol == NFS || pointer.BoolDeref(isHnsEnabled, false) {
185-
return nil, status.Errorf(codes.InvalidArgument, fmt.Sprintf("enableBlobVersioning is not supported for NFS protocol or HNS enabled account"))
185+
return nil, status.Errorf(codes.InvalidArgument, "enableBlobVersioning is not supported for NFS protocol or HNS enabled account")
186186
}
187187
}
188188

pkg/blob/nodeserver.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ func (d *Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRe
314314
}); err != nil {
315315
var helpLinkMsg string
316316
if d.appendMountErrorHelpLink {
317-
helpLinkMsg = fmt.Sprintf("\nPlease refer to http://aka.ms/blobmounterror for possible causes and solutions for mount errors.")
317+
helpLinkMsg = "\nPlease refer to http://aka.ms/blobmounterror for possible causes and solutions for mount errors."
318318
}
319319
return nil, status.Error(codes.Internal, fmt.Sprintf("volume(%s) mount %q on %q failed with %v%s", volumeID, source, targetPath, err, helpLinkMsg))
320320
}
@@ -373,7 +373,7 @@ func (d *Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRe
373373
if err != nil {
374374
var helpLinkMsg string
375375
if d.appendMountErrorHelpLink {
376-
helpLinkMsg = fmt.Sprintf("\nPlease refer to http://aka.ms/blobmounterror for possible causes and solutions for mount errors.")
376+
helpLinkMsg = "\nPlease refer to http://aka.ms/blobmounterror for possible causes and solutions for mount errors."
377377
}
378378
err = status.Errorf(codes.Internal, "Mount failed with error: %v, output: %v%s", err, output, helpLinkMsg)
379379
klog.Errorf("%v", err)

0 commit comments

Comments
 (0)