Skip to content

Commit a184532

Browse files
authored
Merge pull request #152 from prometheus-community/superq/bump_go
Update Go
2 parents c9b2c13 + ed8beb8 commit a184532

File tree

5 files changed

+46
-32
lines changed

5 files changed

+46
-32
lines changed

.circleci/config.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ workflows:
3939
matrix:
4040
parameters:
4141
go_version:
42-
- "1.22"
4342
- "1.23"
43+
- "1.24"
4444
filters:
4545
tags:
4646
only: /.*/
4747
- goreleaser/release:
4848
name: test-release
49-
version: '2.4.7'
50-
go-version: '1.23.3'
49+
version: '2.8.2'
50+
go-version: '1.24.2'
5151
dry-run: true
5252
requires:
5353
- build
@@ -56,8 +56,8 @@ workflows:
5656
only: /.*/
5757
- goreleaser/release:
5858
name: release
59-
version: '2.4.7'
60-
go-version: '1.23.3'
59+
version: '2.8.2'
60+
go-version: '1.24.2'
6161
requires:
6262
- build
6363
filters:

.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@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.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@ec5d18412c0aeab7936cb16880d708ba2a64e1ae # v6.2.0
36+
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
3737
with:
3838
args: --verbose
39-
version: v1.63.4
39+
version: v2.0.2

.golangci.yml

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,33 @@
1-
---
1+
version: "2"
22
linters:
33
enable:
4-
- misspell
5-
- revive
6-
7-
issues:
8-
exclude-rules:
9-
- path: _test.go
10-
linters:
11-
- errcheck
12-
13-
linters-settings:
14-
revive:
4+
- misspell
5+
- revive
6+
settings:
7+
revive:
8+
rules:
9+
- name: unused-parameter
10+
severity: warning
11+
disabled: true
12+
exclusions:
13+
generated: lax
14+
presets:
15+
- comments
16+
- common-false-positives
17+
- legacy
18+
- std-error-handling
1519
rules:
16-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter
17-
- name: unused-parameter
18-
severity: warning
19-
disabled: true
20+
- linters:
21+
- errcheck
22+
path: _test.go
23+
paths:
24+
- third_party$
25+
- builtin$
26+
- examples$
27+
formatters:
28+
exclusions:
29+
generated: lax
30+
paths:
31+
- third_party$
32+
- builtin$
33+
- examples$

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/pro-bing
22

3-
go 1.22
3+
go 1.23.0
44

55
require (
66
github.com/google/uuid v1.6.0

utils_linux.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func (c *icmpConn) SetMark(mark uint) error {
4545
// SetMark sets the SO_MARK socket option on outgoing ICMP packets.
4646
// Setting this option requires CAP_NET_ADMIN.
4747
func (c *icmpv4Conn) SetMark(mark uint) error {
48-
fd, err := getFD(c.icmpConn.c)
48+
fd, err := getFD(c.c)
4949
if err != nil {
5050
return err
5151
}
@@ -58,7 +58,7 @@ func (c *icmpv4Conn) SetMark(mark uint) error {
5858
// SetMark sets the SO_MARK socket option on outgoing ICMP packets.
5959
// Setting this option requires CAP_NET_ADMIN.
6060
func (c *icmpV6Conn) SetMark(mark uint) error {
61-
fd, err := getFD(c.icmpConn.c)
61+
fd, err := getFD(c.c)
6262
if err != nil {
6363
return err
6464
}
@@ -82,7 +82,7 @@ func (c *icmpConn) SetDoNotFragment() error {
8282

8383
// SetDoNotFragment sets the do-not-fragment bit in the IP header of outgoing ICMP packets.
8484
func (c *icmpv4Conn) SetDoNotFragment() error {
85-
fd, err := getFD(c.icmpConn.c)
85+
fd, err := getFD(c.c)
8686
if err != nil {
8787
return err
8888
}
@@ -94,7 +94,7 @@ func (c *icmpv4Conn) SetDoNotFragment() error {
9494

9595
// SetDoNotFragment sets the do-not-fragment bit in the IPv6 header of outgoing ICMPv6 packets.
9696
func (c *icmpV6Conn) SetDoNotFragment() error {
97-
fd, err := getFD(c.icmpConn.c)
97+
fd, err := getFD(c.c)
9898
if err != nil {
9999
return err
100100
}
@@ -117,7 +117,7 @@ func (c *icmpConn) SetBroadcastFlag() error {
117117
}
118118

119119
func (c *icmpv4Conn) SetBroadcastFlag() error {
120-
fd, err := getFD(c.icmpConn.c)
120+
fd, err := getFD(c.c)
121121
if err != nil {
122122
return err
123123
}
@@ -129,7 +129,7 @@ func (c *icmpv4Conn) SetBroadcastFlag() error {
129129
}
130130

131131
func (c *icmpV6Conn) SetBroadcastFlag() error {
132-
fd, err := getFD(c.icmpConn.c)
132+
fd, err := getFD(c.c)
133133
if err != nil {
134134
return err
135135
}

0 commit comments

Comments
 (0)