From ef5ca238bf676781acc7c2a9c056ba0a975d7d95 Mon Sep 17 00:00:00 2001 From: Anika Maskara Date: Thu, 19 Sep 2024 11:49:43 -0400 Subject: [PATCH 1/4] bump go --- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/test.yml | 4 ++-- README.md | 2 +- doc.go | 2 +- go.mod | 2 +- go.sum | 1 + tests/go.mod | 2 +- 7 files changed, 8 insertions(+), 7 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/test.yml b/.github/workflows/test.yml index 8128f79c941..d5c62a1cb9a 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 }} 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/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 From 2137e1481a64a1e3054e3e41f349665674664be8 Mon Sep 17 00:00:00 2001 From: Anika Maskara Date: Thu, 19 Sep 2024 14:53:49 -0400 Subject: [PATCH 2/4] update staticheck --- run-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-tests.sh b/run-tests.sh index 229bf517710..95a74d64eef 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -24,7 +24,7 @@ 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 - From 7eaebdffe827e7a957f6c356b1add19db24f2da0 Mon Sep 17 00:00:00 2001 From: Anika Maskara Date: Thu, 19 Sep 2024 15:18:55 -0400 Subject: [PATCH 3/4] disable S1009 --- run-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-tests.sh b/run-tests.sh index 95a74d64eef..d44f8c44726 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -28,7 +28,7 @@ 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 From 73cde0710dcf239c2130c316c12d881800259b3d Mon Sep 17 00:00:00 2001 From: Anika Maskara Date: Thu, 19 Sep 2024 15:36:54 -0400 Subject: [PATCH 4/4] bump github workflows --- .github/workflows/docs.yml | 2 +- .github/workflows/test.yml | 2 +- .github/workflows/test_integration.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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 d5c62a1cb9a..b53d3eb5154 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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