mirror of
https://github.com/prometheus/node_exporter.git
synced 2025-03-05 21:00:12 -08:00
Fix linter, try to fix exporter
This commit is contained in:
parent
c55b81403e
commit
7423ab01f4
16
.github/workflows/golangci-lint.yml
vendored
16
.github/workflows/golangci-lint.yml
vendored
|
@ -14,19 +14,23 @@ on:
|
|||
|
||||
jobs:
|
||||
golangci:
|
||||
permissions:
|
||||
contents: read # for actions/checkout to fetch code
|
||||
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
|
||||
name: lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
|
||||
- name: install Go
|
||||
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
|
||||
with:
|
||||
go-version: 1.20.x
|
||||
go-version: 1.23.x
|
||||
- name: Install snmp_exporter/generator dependencies
|
||||
run: sudo apt-get update && sudo apt-get -y install libsnmp-dev
|
||||
if: github.repository == 'prometheus/snmp_exporter'
|
||||
- name: Lint
|
||||
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
|
||||
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
|
||||
with:
|
||||
version: v1.54.2
|
||||
args: --verbose
|
||||
version: v1.62.0
|
|
@ -327,7 +327,7 @@ func (c *zfsCollector) parseFreeBSDPoolObjsetStats() error {
|
|||
"nunlinked", "nunlinks", "nread", "reads", "nwritten", "writes",
|
||||
}
|
||||
zfsPoolMibPrefix := "kstat.zfs.pool.dataset"
|
||||
zfsDatasetNames := []string{}
|
||||
zfsDatasetsNames := []string{}
|
||||
|
||||
zfsDatasets, err := unix.Sysctl(zfsPoolMibPrefix)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue