From e80449bbd1c0d26e382f671f0287353cfa7faa60 Mon Sep 17 00:00:00 2001 From: Carsten Dietrich Date: Thu, 22 Aug 2024 14:16:28 +0200 Subject: [PATCH] chore: bump minimum Go version to 1.22 --- .github/workflows/golangci-lint.yml | 2 +- .github/workflows/main.yml | 2 +- go.mod | 14 +++++--------- .../product/dto/variant_selection_mapper_test.go | 15 +++++++-------- 4 files changed, 14 insertions(+), 19 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 611abeea1..17fded43a 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -31,6 +31,6 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v6 with: - version: 'v1.59' + version: 'v1.60' args: $(rev=${{ env.REV }}; if [[ $rev != '' ]]; then echo --new-from-rev=$rev; fi) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6a42512a9..80a7dc56a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go: [ '1.21', '1.x' ] + go: [ '1.22', '1.x' ] name: With Go ${{ matrix.go }} steps: - uses: actions/checkout@v4 diff --git a/go.mod b/go.mod index 2721b8f0c..165af96dd 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module flamingo.me/flamingo-commerce/v3 -go 1.21 +go 1.22 -toolchain go1.22.6 +toolchain go1.23.0 require ( flamingo.me/dingo v0.2.10 @@ -53,6 +53,7 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cockroachdb/apd v1.1.0 // indirect github.com/cockroachdb/apd/v2 v2.0.1 // indirect + github.com/containerd/containerd v1.7.18 // indirect github.com/containerd/errdefs v0.1.0 // indirect github.com/containerd/log v0.1.0 // indirect github.com/coreos/go-oidc/v3 v3.11.0 // indirect @@ -136,6 +137,7 @@ require ( github.com/sergi/go-diff v1.3.1 // indirect github.com/shirou/gopsutil/v3 v3.23.12 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect + github.com/shopspring/decimal v1.2.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/sosodev/duration v1.3.1 // indirect github.com/spf13/pflag v1.0.5 // indirect @@ -160,6 +162,7 @@ require ( go.uber.org/automaxprocs v1.5.3 // indirect go.uber.org/multierr v1.10.0 // indirect go.uber.org/zap v1.27.0 // indirect + golang.org/x/crypto v0.25.0 // indirect golang.org/x/net v0.27.0 // indirect golang.org/x/oauth2 v0.21.0 // indirect golang.org/x/sync v0.8.0 // indirect @@ -175,13 +178,6 @@ require ( moul.io/http2curl/v2 v2.3.0 // indirect ) -require ( - github.com/containerd/containerd v1.7.18 // indirect - github.com/shopspring/decimal v1.2.0 // indirect - golang.org/x/crypto v0.25.0 // indirect - gotest.tools/v3 v3.5.1 -) - exclude ( github.com/coreos/etcd v3.3.27+incompatible github.com/gomodule/redigo v2.0.0+incompatible diff --git a/product/interfaces/graphql/product/dto/variant_selection_mapper_test.go b/product/interfaces/graphql/product/dto/variant_selection_mapper_test.go index a253b3511..0b60217ba 100644 --- a/product/interfaces/graphql/product/dto/variant_selection_mapper_test.go +++ b/product/interfaces/graphql/product/dto/variant_selection_mapper_test.go @@ -3,9 +3,8 @@ package graphqlproductdto import ( "testing" - "gotest.tools/v3/assert" - "flamingo.me/flamingo-commerce/v3/product/domain" + "github.com/stretchr/testify/assert" ) func TestVariantSelectionMappingOfConfigurableProducts(t *testing.T) { @@ -191,21 +190,21 @@ func TestVariantSelectionMappingOfConfigurableProducts(t *testing.T) { }, } - assert.DeepEqual(t, want.Attributes, got.Attributes) + assert.Equal(t, want.Attributes, got.Attributes) - assert.DeepEqual(t, got.Variants[0].Attributes, redSMarchingSelection) + assert.Equal(t, got.Variants[0].Attributes, redSMarchingSelection) assert.Equal(t, got.Variants[0].Variant.MarketplaceCode, redS.MarketPlaceCode) - assert.DeepEqual(t, got.Variants[1].Attributes, redMMarchingSelection) + assert.Equal(t, got.Variants[1].Attributes, redMMarchingSelection) assert.Equal(t, got.Variants[1].Variant.MarketplaceCode, redM.MarketPlaceCode) - assert.DeepEqual(t, got.Variants[2].Attributes, redLMatchingSelection) + assert.Equal(t, got.Variants[2].Attributes, redLMatchingSelection) assert.Equal(t, got.Variants[2].Variant.MarketplaceCode, redL.MarketPlaceCode) - assert.DeepEqual(t, got.Variants[3].Attributes, blueSMatchingSelection) + assert.Equal(t, got.Variants[3].Attributes, blueSMatchingSelection) assert.Equal(t, got.Variants[3].Variant.MarketplaceCode, blueS.MarketPlaceCode) - assert.DeepEqual(t, got.Variants[4].Attributes, blueMMatchingSelection) + assert.Equal(t, got.Variants[4].Attributes, blueMMatchingSelection) assert.Equal(t, got.Variants[4].Variant.MarketplaceCode, blueM.MarketPlaceCode) }) }