Skip to content

Commit

Permalink
Fixing golang format and linting
Browse files Browse the repository at this point in the history
  • Loading branch information
alikdell committed Feb 26, 2024
1 parent aceadfa commit fa55c1c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Run the formatter, linter, and vetter
uses: dell/common-github-actions/go-code-formatter-linter-vetter@main
with:
Expand All @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Run Go Security
uses: securego/gosec@master
with:
Expand All @@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Run malware scan
uses: dell/common-github-actions/malware-scanner@main
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/linters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ jobs:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: "1.20"
go-version: "1.22"
cache: false
- name: Checkout the code
uses: actions/checkout@v3.2.0
uses: actions/checkout@v4.1.0
- name: Vendor packages
run: |
go mod vendor
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4
with:
version: v1.53
version: latest
skip-cache: true
2 changes: 1 addition & 1 deletion iscsi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ func TestISCSIConnector_ConnectVolume(t *testing.T) {
{
name: "empty request",
fields: getDefaultISCSIFields(ctrl),
stateSetter: func(fields iscsiFields) {},
stateSetter: func(_ iscsiFields) {},
args: args{ctx: ctx, info: ISCSIVolumeInfo{}},
want: Device{},
wantErr: true,
Expand Down
4 changes: 2 additions & 2 deletions pkg/scsi/scsi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ func Test_scsi_RescanSCSIDeviceByHCTL(t *testing.T) {
{
name: "HCTL is not full",
fields: getDefaultSCSIFields(ctrl),
stateSetter: func(fields scsiFields) {},
stateSetter: func(_ scsiFields) {},
args: args{ctx: ctx, h: getHostOnlyHCTL()},
wantErr: true,
},
Expand Down Expand Up @@ -955,7 +955,7 @@ func Test_scsi_GetDeviceNameByHCTL(t *testing.T) {
{
name: "invalid HCTL",
fields: getDefaultSCSIFields(ctrl),
stateSetter: func(fields scsiFields) {},
stateSetter: func(_ scsiFields) {},
args: args{ctx: ctx, h: getHostOnlyHCTL()},
want: "",
wantErr: true,
Expand Down

0 comments on commit fa55c1c

Please sign in to comment.