Skip to content

Commit 9fa9201

Browse files
authored
Merge pull request #210 from prometheus-community/superq/go_1.24
Update Go
2 parents 211d868 + c53dbb8 commit 9fa9201

File tree

7 files changed

+32
-22
lines changed

7 files changed

+32
-22
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ executors:
88
# This must match .promu.yml.
99
golang:
1010
docker:
11-
- image: cimg/go:1.23
11+
- image: cimg/go:1.24
1212

1313
jobs:
1414
test:

.github/workflows/golangci-lint.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ jobs:
2626
- name: Checkout repository
2727
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2828
- name: Install Go
29-
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
29+
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
3030
with:
31-
go-version: 1.23.x
31+
go-version: 1.24.x
3232
- name: Install snmp_exporter/generator dependencies
3333
run: sudo apt-get update && sudo apt-get -y install libsnmp-dev
3434
if: github.repository == 'prometheus/snmp_exporter'
3535
- name: Lint
36-
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
36+
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
3737
with:
3838
args: --verbose
39-
version: v1.63.4
39+
version: v2.1.5

.golangci.yml

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
1-
---
2-
issues:
3-
exclude-rules:
4-
- path: _test.go
5-
linters:
6-
- errcheck
7-
8-
linters-settings:
9-
errcheck:
10-
exclude-functions:
11-
# Used in HTTP handlers, any error is handled by the server itself.
12-
- (net/http.ResponseWriter).Write
13-
1+
version: "2"
142
linters:
153
enable:
164
- misspell
175
- revive
186
- sloglint
7+
exclusions:
8+
generated: lax
9+
presets:
10+
- comments
11+
- common-false-positives
12+
- legacy
13+
- std-error-handling
14+
rules:
15+
- linters:
16+
- errcheck
17+
path: _test.go
18+
paths:
19+
- third_party$
20+
- builtin$
21+
- examples$
22+
formatters:
23+
exclusions:
24+
generated: lax
25+
paths:
26+
- third_party$
27+
- builtin$
28+
- examples$

.promu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
go:
22
# This must match .circle/config.yml.
3-
version: 1.23
3+
version: 1.24
44
repository:
55
path: github.com/prometheus-community/pgbouncer_exporter
66
build:

Makefile.common

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_
6161
SKIP_GOLANGCI_LINT :=
6262
GOLANGCI_LINT :=
6363
GOLANGCI_LINT_OPTS ?=
64-
GOLANGCI_LINT_VERSION ?= v1.63.4
64+
GOLANGCI_LINT_VERSION ?= v2.1.5
6565
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64/arm64.
6666
# windows isn't included here because of the path separator being different.
6767
ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin))

collector.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ func queryNamespaceMapping(ch chan<- prometheus.Metric, db *sql.DB, namespace st
327327
}
328328
if err := rows.Err(); err != nil {
329329
logger.Error("Failed scaning all rows", "err", err.Error())
330-
nonfatalErrors = append(nonfatalErrors, fmt.Errorf("Failed to consume all rows due to: %w", err))
330+
nonfatalErrors = append(nonfatalErrors, fmt.Errorf("failed to consume all rows due to: %w", err))
331331
}
332332
return nonfatalErrors, nil
333333
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/prometheus-community/pgbouncer_exporter
22

3-
go 1.22
3+
go 1.23.0
44

55
require (
66
github.com/DATA-DOG/go-sqlmock v1.5.2

0 commit comments

Comments
 (0)