chore(deps): bump minimum Go version to 1.21

This commit is contained in:
Ambrose Chua 2024-03-19 14:50:09 +08:00
parent ea485a7806
commit 5ba743afea
No known key found for this signature in database
GPG Key ID: 36C99AADD44C83D2
5 changed files with 11 additions and 9 deletions

View File

@ -19,7 +19,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.19
go-version: ^1.21
id: go
- name: Check out code into the Go module directory

View File

@ -5,7 +5,7 @@ jobs:
lint:
strategy:
matrix:
go: [1.18, 1.19]
go: [1.21, 1.22]
name: lint
runs-on: ubuntu-latest
steps:
@ -16,4 +16,4 @@ jobs:
with:
go-version: ${{ matrix.go }}
- name: "Run go vet"
run: "go vet ./pkg/..."
run: "go vet ./pkg/..."

View File

@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: [1.18, 1.19]
go: [1.21, 1.22]
cross_compile: [true, false]
steps:
- uses: actions/checkout@v4
@ -35,7 +35,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: ^1.21
- name: Install dyff
run: go install github.com/homeport/dyff/cmd/dyff@v1.5.8
- name: Create .coverprofile for each targeted directory by re:running tests

4
go.mod
View File

@ -1,6 +1,8 @@
module github.com/kubernetes/kompose
go 1.18
go 1.21
toolchain go1.21.8
require (
github.com/compose-spec/compose-go/v2 v2.0.0-rc.8

View File

@ -441,7 +441,7 @@ func TestUnsupportedKeys(t *testing.T) {
},
},
Services: types.Services{
types.ServiceConfig{
"foo": types.ServiceConfig{
Name: "foo",
Image: "foo/bar",
Build: &types.BuildConfig{
@ -453,7 +453,7 @@ func TestUnsupportedKeys(t *testing.T) {
"net1": {},
},
},
types.ServiceConfig{
"bar": types.ServiceConfig{
Name: "bar",
Image: "bar/foo",
Build: &types.BuildConfig{
@ -476,7 +476,7 @@ func TestUnsupportedKeys(t *testing.T) {
projectWithDefaultNetwork := &types.Project{
Services: types.Services{
types.ServiceConfig{
"foo": types.ServiceConfig{
Networks: map[string]*types.ServiceNetworkConfig{
"default": {},
},