Skip to content

Commit 13a08d3

Browse files
authored
Update Go to 1.26. (#378)
* Update minimum Go version to 1.25.0. * Update build for Go 1.26.x. * Update yaml module to supported version. * Sync some CI workflow settings. Signed-off-by: SuperQ <superq@gmail.com>
1 parent 619d8cf commit 13a08d3

5 files changed

Lines changed: 19 additions & 21 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
name: CI
22

33
on:
4-
push:
5-
tags:
6-
- 'v*'
7-
branches:
8-
- main
94
pull_request:
10-
workflow_call:
5+
push:
6+
branches: [main, 'release-*']
7+
tags: ['v*']
118

129
jobs:
1310
build:
1411
name: Build for common architectures
1512
runs-on: ubuntu-latest
1613
if: |
17-
!(github.event_name == 'push' && github.event.ref == 'refs/heads/main')
18-
&&
1914
!(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
15+
&&
16+
!(github.event_name == 'pull_request' && startsWith(github.event.pull_request.base.ref, 'release-'))
17+
&&
18+
!(github.event_name == 'push' && github.event.ref == 'refs/heads/main')
2019
strategy:
2120
matrix:
2221
thread: [ 0, 1, 2 ]
@@ -33,9 +32,11 @@ jobs:
3332
name: Build for all architectures
3433
runs-on: ubuntu-latest
3534
if: |
36-
(github.event_name == 'push' && github.event.ref == 'refs/heads/main')
37-
||
3835
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
36+
||
37+
(github.event_name == 'pull_request' && startsWith(github.event.pull_request.base.ref, 'release-'))
38+
||
39+
(github.event_name == 'push' && github.event.ref == 'refs/heads/main')
3940
strategy:
4041
matrix:
4142
thread: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ]
@@ -51,7 +52,7 @@ jobs:
5152
name: Verify
5253
runs-on: ubuntu-latest
5354
container:
54-
image: quay.io/prometheus/golang-builder:1.25-base
55+
image: quay.io/prometheus/golang-builder:1.26-base
5556
steps:
5657
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5758
- run: make build

.promu.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
go:
2-
# This must match .circle/config.yml.
3-
version: 1.25
2+
# This must match .github/workflows/ci.yml.
3+
version: 1.26
44
repository:
55
path: github.com/prometheus-community/fortigate_exporter
66
build:

go.mod

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
module github.com/prometheus-community/fortigate_exporter
22

3-
go 1.24.0
3+
go 1.25.0
44

55
require (
66
github.com/google/go-jsonnet v0.21.0
77
github.com/prometheus/client_golang v1.23.2
8-
gopkg.in/yaml.v2 v2.4.0
8+
go.yaml.in/yaml/v2 v2.4.4
99
)
1010

1111
require (
@@ -17,7 +17,6 @@ require (
1717
github.com/prometheus/client_model v0.6.2 // indirect
1818
github.com/prometheus/common v0.66.1 // indirect
1919
github.com/prometheus/procfs v0.16.1 // indirect
20-
go.yaml.in/yaml/v2 v2.4.2 // indirect
2120
golang.org/x/crypto v0.45.0 // indirect
2221
golang.org/x/sys v0.38.0 // indirect
2322
google.golang.org/protobuf v1.36.8 // indirect

go.sum

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu
3838
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
3939
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
4040
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
41-
go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI=
42-
go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU=
41+
go.yaml.in/yaml/v2 v2.4.4 h1:tuyd0P+2Ont/d6e2rl3be67goVK4R6deVxCUX5vyPaQ=
42+
go.yaml.in/yaml/v2 v2.4.4/go.mod h1:gMZqIpDtDqOfM0uNfy0SkpRhvUryYH0Z6wdMYcacYXQ=
4343
golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
4444
golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
4545
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
@@ -49,8 +49,6 @@ google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXn
4949
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
5050
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
5151
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
52-
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
53-
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
5452
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
5553
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
5654
sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=

internal/config/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"os"
2020
"strings"
2121

22-
"gopkg.in/yaml.v2"
22+
"go.yaml.in/yaml/v2"
2323
)
2424

2525
type FortiExporterParameter struct {

0 commit comments

Comments
 (0)