From 29b38b0f73f0546449cd308703a3644a0a9a71ef Mon Sep 17 00:00:00 2001 From: Andrey Butusov Date: Thu, 29 Aug 2024 18:08:14 +0300 Subject: [PATCH 1/2] go.mod, workflows: update to Go 1.22 min Drop 1.21 and use 1.23 for test and build. Closes #75. Signed-off-by: Andrey Butusov --- .github/workflows/build.yml | 2 +- .github/workflows/go.yml | 12 +++--------- go.mod | 2 +- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ace81fb..1e237e7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,7 +37,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: '1.22' + go-version: '1.23' cache: true - name: Update Go modules diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index ce25ed0..a5aecf7 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -34,24 +34,18 @@ jobs: strategy: matrix: os: [ubuntu-22.04, windows-2022, macos-12, macos-14] - go: [ '1.21', '1.22' ] + go: [ '1.22', '1.23' ] exclude: # Only latest Go version for Windows and MacOS. - - os: windows-2022 - go: '1.21' - os: windows-2022 go: '1.22' - - os: macos-12 - go: '1.21' - os: macos-12 go: '1.22' - - os: macos-14 - go: '1.21' - os: macos-14 go: '1.22' # Exclude latest Go version for Ubuntu as Coverage uses it. - os: ubuntu-22.04 - go: '1.22' + go: '1.23' fail-fast: false steps: - name: Setup go @@ -81,7 +75,7 @@ jobs: uses: actions/setup-go@v5 with: cache: true - go-version: 1.22 + go-version: 1.23 - name: Test and write coverage profile run: go test -coverprofile=coverage.txt -covermode=atomic ./... diff --git a/go.mod b/go.mod index 65d9627..d63c062 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/nspcc-dev/xk6-neofs -go 1.21 +go 1.22 require ( github.com/aws/aws-sdk-go-v2 v1.30.3 From dad76ef7c624d2e2ac74a4e75df89f75dd6fc7d1 Mon Sep 17 00:00:00 2001 From: Andrey Butusov Date: Thu, 29 Aug 2024 18:42:24 +0300 Subject: [PATCH 2/2] *: use for range integer instead of for loop Signed-off-by: Andrey Butusov --- internal/datagen/generator_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/datagen/generator_test.go b/internal/datagen/generator_test.go index 3b5fe7c..6e089f5 100644 --- a/internal/datagen/generator_test.go +++ b/internal/datagen/generator_test.go @@ -46,7 +46,7 @@ func TestGenerator(t *testing.T) { t.Run("keeps generating slices after consuming entire tail", func(t *testing.T) { g := NewGenerator(vu, 1000) initialSlice := g.nextSlice() - for i := 0; i < TailSize; i++ { + for range TailSize { g.nextSlice() } // After we looped around our tail and returned to the beginning we should have a