Skip to content

Commit 299f181

Browse files
authored
feat: require Go >= 1.20 (#392)
This follows our Go version policy https://github.com/hetznercloud/hcloud-go#go-version-support, but we don't want to force an unjustified go version upgrade for users of this library, so we only require go 1.20 instead of go 1.21. The prometheus client_golang bumped the required go version to 1.20, we need to follow to be able to upgrade this dependency: #388
1 parent accbd7b commit 299f181

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

.github/workflows/ci.yml

+12-10
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,22 @@ jobs:
2424
test:
2525
strategy:
2626
matrix:
27-
go-version: ["1.19", "1.20", "1.21"]
27+
go-version:
28+
- "1.20"
29+
- "1.21"
2830

2931
runs-on: ubuntu-latest
3032
steps:
31-
- uses: actions/checkout@v4
32-
- uses: actions/setup-go@v5
33-
with:
34-
go-version: ${{ matrix.go-version }}
33+
- uses: actions/checkout@v4
34+
- uses: actions/setup-go@v5
35+
with:
36+
go-version: ${{ matrix.go-version }}
3537

36-
- run: go test -coverprofile=coverage.txt -v -race ./...
38+
- run: go test -coverprofile=coverage.txt -v -race ./...
3739

38-
- uses: codecov/codecov-action@v4
39-
with:
40-
token: ${{ secrets.CODECOV_TOKEN }}
40+
- uses: codecov/codecov-action@v4
41+
with:
42+
token: ${{ secrets.CODECOV_TOKEN }}
4143

4244
generate:
4345
runs-on: ubuntu-latest
@@ -53,4 +55,4 @@ jobs:
5355
- run: git diff --exit-code
5456

5557
- if: failure()
56-
run: echo "::error::Check failed, please run 'go generate ./...' and commit the changes."
58+
run: echo "::error::Check failed, please run 'go generate ./...' and commit the changes."

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module github.com/hetznercloud/hcloud-go/v2
44
// all dependends to update to the new version.
55
// As long as we do not depend on any newer language feature this can be kept at the current value.
66
// It should never be higher than the lowest currently supported version of Go.
7-
go 1.19
7+
go 1.20
88

99
require (
1010
github.com/google/go-cmp v0.6.0

0 commit comments

Comments
 (0)