Skip to content

Commit

Permalink
bump go version to 1.22 (#2692)
Browse files Browse the repository at this point in the history
* bump go

* update staticheck

* disable S1009

* bump github workflows
  • Loading branch information
amaskara-dd authored Sep 20, 2024
1 parent cdb86cd commit 57d78c2
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// Requirements
//
// • Go 1.19+
// • Go 1.22+
//
// Layout
//
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
4 changes: 2 additions & 2 deletions run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 57d78c2

Please sign in to comment.