From 57d78c277b7bff2ce85bd14dffa94338988fd38f Mon Sep 17 00:00:00 2001 From: amaskara-dd <175134603+amaskara-dd@users.noreply.github.com> Date: Fri, 20 Sep 2024 09:45:08 -0400 Subject: [PATCH] bump go version to 1.22 (#2692) * bump go * update staticheck * disable S1009 * bump github workflows --- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/docs.yml | 2 +- .github/workflows/test.yml | 6 +++--- .github/workflows/test_integration.yml | 2 +- README.md | 2 +- doc.go | 2 +- go.mod | 2 +- go.sum | 1 + run-tests.sh | 4 ++-- tests/go.mod | 2 +- 10 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index e16ada8da29..7523cb0c507 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -29,7 +29,7 @@ jobs: - uses: actions/setup-go@v4 with: - go-version: 1.19.x + go-version: 1.22.x # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 23c023349ab..ba5a78b083b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -18,7 +18,7 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: 1.19.x + go-version: 1.22.x - name: Build documentation run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8128f79c941..b53d3eb5154 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -52,7 +52,7 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: 1.19.x + go-version: 1.22.x - id: pre_commit name: Run pre-commit if: github.event.action != 'closed' && github.event.pull_request.merged != true @@ -81,7 +81,7 @@ jobs: test: strategy: matrix: - go-version: [1.19.x, 1.20.x] + go-version: [1.22.x, 1.23.x] go-build-tags: ["--tags=goccy_gojson", ""] platform: [ubuntu-latest] runs-on: ${{ matrix.platform }} @@ -108,7 +108,7 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: 1.19.x + go-version: 1.22.x cache: true cache-dependency-path: tests/go.sum - name: Check examples diff --git a/.github/workflows/test_integration.yml b/.github/workflows/test_integration.yml index dc2afe4623a..b7e03b35daa 100644 --- a/.github/workflows/test_integration.yml +++ b/.github/workflows/test_integration.yml @@ -62,7 +62,7 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: 1.19.x + go-version: 1.22.x cache: true cache-dependency-path: tests/go.sum - name: Run integration tests diff --git a/README.md b/README.md index 983bf2de08b..d51e5dd3b9a 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This repository contains a Go API client for the [Datadog API](https://docs.data ## Requirements -- Go 1.19+ +- Go 1.22+ ## Layout diff --git a/doc.go b/doc.go index 96c0e9181a8..1a2de5a7901 100644 --- a/doc.go +++ b/doc.go @@ -4,7 +4,7 @@ // // Requirements // -// • Go 1.19+ +// • Go 1.22+ // // Layout // diff --git a/go.mod b/go.mod index ea9be6c152f..4fe466f3b39 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/DataDog/datadog-api-client-go/v2 -go 1.19 +go 1.22 retract ( // Version used to retract v2.0.0 and v2.0.1. DO NOT USE. diff --git a/go.sum b/go.sum index f8f53ae08b3..995e0242604 100644 --- a/go.sum +++ b/go.sum @@ -8,6 +8,7 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= diff --git a/run-tests.sh b/run-tests.sh index 229bf517710..d44f8c44726 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -24,11 +24,11 @@ fi # unfortunately there's no better way to fix this than change directory # this might get solved in Go 1.14: https://github.com/golang/go/issues/30515 cd "$(mktemp -d)" -GO111MODULE=on go install honnef.co/go/tools/cmd/staticcheck@v0.4.3 +GO111MODULE=on go install honnef.co/go/tools/cmd/staticcheck@v0.5.0 GO111MODULE=on go install gotest.tools/gotestsum@latest cd - -staticcheck ./api/... +staticcheck -checks -SA1009 ./api/... go mod tidy go clean -testcache diff --git a/tests/go.mod b/tests/go.mod index 20f4bf06fae..30524c6ffc3 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -1,6 +1,6 @@ module github.com/DataDog/datadog-api-client-go/v2/tests -go 1.19 +go 1.22 require ( github.com/DataDog/datadog-api-client-go/v2 v2.14.0