Skip to content

Commit e1cdb48

Browse files
authored
feat: upgrade to go 1.24 and adjust to new liner version (#15)
Signed-off-by: Martin Chodur <m.chodur@seznam.cz>
1 parent fd7e589 commit e1cdb48

10 files changed

Lines changed: 107 additions & 97 deletions

File tree

.github/workflows/go.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v4
1414

1515
- name: Set up Go
16-
uses: actions/setup-go@v2
16+
uses: actions/setup-go@v5
1717
with:
18-
go-version: "1.21"
18+
go-version: "1.24"
1919

2020
- name: Golangci-lint
21-
uses: golangci/golangci-lint-action@v3.6.0
21+
uses: golangci/golangci-lint-action@v6
2222

2323
- name: Build
2424
run: make build
@@ -30,8 +30,8 @@ jobs:
3030
run: make e2e-test
3131

3232
- name: Run GoReleaser
33-
uses: goreleaser/goreleaser-action@v2
33+
uses: goreleaser/goreleaser-action@v6
3434
with:
3535
distribution: goreleaser
3636
version: latest
37-
args: build --snapshot --rm-dist
37+
args: build --snapshot --clean

.github/workflows/release.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,24 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0
1919
- name: Set up Go
20-
uses: actions/setup-go@v2
20+
uses: actions/setup-go@v5
2121
with:
22-
go-version: "1.21"
22+
go-version: "1.24"
2323

2424
- name: Login to Docker Hub
2525
uses: docker/login-action@v1
2626
with:
2727
username: ${{ secrets.DOCKERHUB_USERNAME }}
2828
password: ${{ secrets.DOCKERHUB_TOKEN }}
2929
- name: Run GoReleaser
30-
uses: goreleaser/goreleaser-action@v2
30+
uses: goreleaser/goreleaser-action@v6
3131
with:
3232
distribution: goreleaser
3333
version: latest
34-
args: release --rm-dist
34+
args: release --clean
3535
env:
3636
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
### Changed
10+
- Upgraded to Go 1.24
11+
912
## [2.2.0] - 2023-07-14
1013
### Added
1114
- New config option `prometheus_bearer_token` to allow authentication with Prometheus using a bearer token

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ build:
2828
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o $(AUTOGRAF_BIN)
2929

3030
goreleaser-build:
31-
goreleaser build --snapshot --rm-dist
31+
goreleaser release --snapshot --clean
3232

3333
docker: build
3434
docker build -t fusakla/autograf .

generate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func (r *Command) Run(ctx *Context) error {
7373
return err
7474
}
7575
} else {
76-
return fmt.Errorf("At least one of inputs metrics file or Prometheus URL is required")
76+
return fmt.Errorf("at least one of inputs metrics file or Prometheus URL is required")
7777
}
7878
if err := prometheus.ProcessMetrics(metrics); err != nil {
7979
return err

go.mod

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,40 @@
11
module github.com/fusakla/autograf
22

3-
go 1.21
3+
go 1.24
44

5-
require github.com/alecthomas/kong v0.8.0
5+
require github.com/alecthomas/kong v0.9.0
66

77
require (
88
github.com/K-Phoen/sdk v0.12.0 // indirect
9-
github.com/cespare/xxhash/v2 v2.2.0 // indirect
10-
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
9+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
10+
github.com/gabriel-vasile/mimetype v1.4.5 // indirect
1111
github.com/go-playground/locales v0.14.1 // indirect
1212
github.com/go-playground/universal-translator v0.18.1 // indirect
1313
github.com/gogo/protobuf v1.3.2 // indirect
14-
github.com/google/go-cmp v0.5.9 // indirect
15-
github.com/gosimple/slug v1.13.1 // indirect
14+
github.com/google/go-cmp v0.6.0 // indirect
15+
github.com/gosimple/slug v1.14.0 // indirect
1616
github.com/gosimple/unidecode v1.0.1 // indirect
17-
github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect
17+
github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc // indirect
1818
github.com/json-iterator/go v1.1.12 // indirect
19-
github.com/leodido/go-urn v1.2.4 // indirect
19+
github.com/leodido/go-urn v1.4.0 // indirect
2020
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
2121
github.com/modern-go/reflect2 v1.0.2 // indirect
2222
github.com/pkg/errors v0.9.1 // indirect
23-
golang.org/x/crypto v0.11.0 // indirect
24-
golang.org/x/net v0.12.0 // indirect
25-
golang.org/x/sys v0.10.0 // indirect
26-
golang.org/x/text v0.11.0 // indirect
23+
github.com/prometheus/client_model v0.6.1 // indirect
24+
golang.org/x/crypto v0.26.0 // indirect
25+
golang.org/x/net v0.28.0 // indirect
26+
golang.org/x/sys v0.24.0 // indirect
27+
golang.org/x/text v0.17.0 // indirect
28+
google.golang.org/protobuf v1.34.2 // indirect
2729
)
2830

2931
require (
3032
github.com/fusakla/sdk v0.12.4
31-
github.com/go-playground/validator/v10 v10.14.1
32-
github.com/prometheus/client_golang v1.16.0
33-
github.com/prometheus/common v0.44.0
34-
github.com/prometheus/prometheus v0.45.0
33+
github.com/go-playground/validator/v10 v10.22.0
34+
github.com/prometheus/client_golang v1.20.2
35+
github.com/prometheus/common v0.55.0
36+
github.com/prometheus/prometheus v0.54.0
3537
github.com/sirupsen/logrus v1.9.3
36-
golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1
38+
golang.org/x/exp v0.0.0-20240823005443-9b4947da3948
3739
gotest.tools v2.2.0+incompatible
3840
)

0 commit comments

Comments
 (0)