From 5796da3afc7ae8fb8afdc8801f1299e8f3cc886e Mon Sep 17 00:00:00 2001 From: Gary <982483+gmalouf@users.noreply.github.com> Date: Wed, 8 May 2024 15:19:12 -0400 Subject: [PATCH] Build: Bump golang version to 1.21.10 (#636) * Bump golang version to 1.21.10 * Address new linter warnings. --- .circleci/config.yml | 4 ++-- .github/workflows/reviewdog.yml | 8 ++++---- go.mod | 4 +++- go.sum | 1 + test/docker/Dockerfile | 2 +- test/helpers.go | 4 ++-- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 85d2e3cf..ebdc0f6d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2.1 orbs: - go: circleci/go@1.7.3 + go: circleci/go@1.11.0 workflows: circleci_build_and_test: @@ -10,7 +10,7 @@ workflows: name: 'test_go_<< matrix.go_version >>' matrix: parameters: - go_version: ['1.20.14'] + go_version: ['1.21.10'] jobs: test: diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index 4cb4b7b5..a595b8bf 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -12,17 +12,17 @@ jobs: - name: Install specific golang uses: actions/setup-go@v4.0.1 with: - go-version: '1.20.14' + go-version: '1.21.10' - name: Check format run: test -z `go fmt ./...` - name: Vet run: go vet ./... - name: reviewdog-golangci-lint - uses: reviewdog/action-golangci-lint@v2.3.1 + uses: reviewdog/action-golangci-lint@v2.6.1 with: - golangci_lint_version: "v1.53.2" + golangci_lint_version: "v1.58.0" golangci_lint_flags: "-c .golangci.yml --allow-parallel-runners" - go_version: "1.20.14" + go_version: "1.21.10" reporter: "github-pr-review" tool_name: "Lint Errors" level: "error" diff --git a/go.mod b/go.mod index 37b32c8f..7040cd37 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module github.com/algorand/go-algorand-sdk/v2 -go 1.20 +go 1.21 + +toolchain go1.21.10 require ( github.com/algorand/avm-abi v0.1.1 diff --git a/go.sum b/go.sum index 960ca0a0..e8b1fb2b 100644 --- a/go.sum +++ b/go.sum @@ -3,6 +3,7 @@ github.com/algorand/avm-abi v0.1.1/go.mod h1:+CgwM46dithy850bpTeHh9MC99zpn2Snirb github.com/algorand/go-codec/codec v1.1.10 h1:zmWYU1cp64jQVTOG8Tw8wa+k0VfwgXIPbnDfiVa+5QA= github.com/algorand/go-codec/codec v1.1.10/go.mod h1:YkEx5nmr/zuCeaDYOIhlDg92Lxju8tj2d2NrYqP7g7k= github.com/chrismcguire/gobberish v0.0.0-20150821175641-1d8adb509a0e h1:CHPYEbz71w8DqJ7DRIq+MXyCQsdibK08vdcQTY4ufas= +github.com/chrismcguire/gobberish v0.0.0-20150821175641-1d8adb509a0e/go.mod h1:6Xhs0ZlsRjXLIiSMLKafbZxML/j30pg9Z1priLuha5s= github.com/cucumber/godog v0.8.1 h1:lVb+X41I4YDreE+ibZ50bdXmySxgRviYFgKY6Aw4XE8= github.com/cucumber/godog v0.8.1/go.mod h1:vSh3r/lM+psC1BPXvdkSEuNjmXfpVqrMGYAElF6hxnA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/test/docker/Dockerfile b/test/docker/Dockerfile index ad11856f..322707f0 100644 --- a/test/docker/Dockerfile +++ b/test/docker/Dockerfile @@ -1,4 +1,4 @@ -ARG GO_IMAGE=golang:1.20.14 +ARG GO_IMAGE=golang:1.21.10 FROM $GO_IMAGE # Copy SDK code into the container diff --git a/test/helpers.go b/test/helpers.go index f362be89..0fc05254 100644 --- a/test/helpers.go +++ b/test/helpers.go @@ -52,7 +52,7 @@ func mockHTTPResponsesInLoadedFromHelper(jsonfiles, directory string, status int responseRing.Value = json responseRing = responseRing.Next() } - mockServer = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + mockServer = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { json := responseRing.Value.([]byte) if status > 0 { w.WriteHeader(status) @@ -67,7 +67,7 @@ var receivedMethod string var receivedPath string func mockServerRecordingRequestPaths() error { - mockServer = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + mockServer = httptest.NewServer(http.HandlerFunc(func(_ http.ResponseWriter, r *http.Request) { receivedMethod = r.Method receivedPath = r.URL.String() }))