diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d96c551..8775434 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.21 + go-version: 1.23 - name: Vet run: go vet ./... @@ -35,6 +35,6 @@ jobs: uses: goreleaser/goreleaser-action@v6 with: version: latest - args: release --rm-dist + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 466bd34..eae1120 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -17,4 +17,4 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v6 with: - version: v1.54 + version: v1.61 diff --git a/.golangci.yml b/.golangci.yml index 8404070..eedc733 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -20,6 +20,10 @@ issues: - path: 'snmp/snmpwalk.go' linters: - funlen + - perfsprint + - path: 'snmp/util.go' + linters: + - perfsprint - path: 'hp/mib/cpq_sm_cntrl.go' linters: - golint @@ -43,6 +47,7 @@ linters: - goerr113 - gofumpt - gomnd + - mnd - lll - musttag - nakedret diff --git a/main.go b/main.go index 7d55e43..260906f 100644 --- a/main.go +++ b/main.go @@ -148,6 +148,7 @@ func main() { for _, controller := range controllers { controllerStatus, desc := controller.GetNagiosStatus() overall.Add(controllerStatus, desc) + countControllers++ } } @@ -173,6 +174,7 @@ func main() { for _, drive := range drives { driveStatus, desc := drive.GetNagiosStatus() overall.Add(driveStatus, desc) + countDrives++ } } diff --git a/snmp/table.go b/snmp/table.go index 612823a..c4235fe 100644 --- a/snmp/table.go +++ b/snmp/table.go @@ -139,6 +139,7 @@ func SortOIDs(list []string) []string { sort.Slice(list, func(i, j int) bool { v1, _ := version.NewVersion(list[i]) v2, _ := version.NewVersion(list[j]) + return v1.LessThan(v2) })