Skip to content

tes: fix golint action failure #834

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .github/workflows/static.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ jobs:
name: Go Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: ^1.19
- uses: actions/checkout@master
- name: Run linter
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
version: v1.45
# https://golangci-lint.run/usage/linters/
args: -E=gofmt,deadcode,unused,varcheck,ineffassign,revive,misspell,exportloopref,asciicheck,bodyclose,depguard,dogsled,dupl,durationcheck,errname,errorlint,forbidigo -D=staticcheck --timeout=30m0s
version: v1.51
args: -E=gofmt,deadcode,unused,varcheck,ineffassign,revive,misspell,exportloopref,asciicheck,bodyclose,depguard,dogsled,durationcheck,errname,forbidigo -D=staticcheck --timeout=30m0s
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module sigs.k8s.io/blob-csi-driver

go 1.18
go 1.19

require (
github.com/Azure/azure-sdk-for-go v67.3.0+incompatible
Expand Down
2 changes: 1 addition & 1 deletion pkg/blob/controllerserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest)

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

Expand Down
4 changes: 2 additions & 2 deletions pkg/blob/nodeserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ func (d *Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRe
}); err != nil {
var helpLinkMsg string
if d.appendMountErrorHelpLink {
helpLinkMsg = fmt.Sprintf("\nPlease refer to http://aka.ms/blobmounterror for possible causes and solutions for mount errors.")
helpLinkMsg = "\nPlease refer to http://aka.ms/blobmounterror for possible causes and solutions for mount errors."
}
return nil, status.Error(codes.Internal, fmt.Sprintf("volume(%s) mount %q on %q failed with %v%s", volumeID, source, targetPath, err, helpLinkMsg))
}
Expand Down Expand Up @@ -373,7 +373,7 @@ func (d *Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRe
if err != nil {
var helpLinkMsg string
if d.appendMountErrorHelpLink {
helpLinkMsg = fmt.Sprintf("\nPlease refer to http://aka.ms/blobmounterror for possible causes and solutions for mount errors.")
helpLinkMsg = "\nPlease refer to http://aka.ms/blobmounterror for possible causes and solutions for mount errors."
}
err = status.Errorf(codes.Internal, "Mount failed with error: %v, output: %v%s", err, output, helpLinkMsg)
klog.Errorf("%v", err)
Expand Down