From f608107012b7738c6a120fe5620126699c84243f Mon Sep 17 00:00:00 2001 From: Tim Geoghegan Date: Wed, 29 May 2024 11:11:58 -0700 Subject: [PATCH] Update to Go 1.21 Use Go 1.21 in `go.mod` and the Dockerfile. Additionally, introduces a `matrix` to the `go.yml` workflow so that the project gets built and tested on Go 1.21 and 1.22. We target 1.21 so we can use `log/slog` in a subsequent change. See #61 for discussion. --- .github/workflows/go.yml | 5 ++++- Dockerfile | 2 +- go.mod | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 37a1d1b..0666190 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -9,6 +9,9 @@ on: jobs: build-and-test: + strategy: + matrix: + go-version: [ "1.21", "1.22"] name: Build and test runs-on: ubuntu-latest steps: @@ -17,7 +20,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.22 + go-version: ${{ matrix.go-version }} - name: Build run: go build -v ./... diff --git a/Dockerfile b/Dockerfile index d420741..a0806b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.20-bookworm as build +FROM golang:1.21-bookworm as build WORKDIR /app diff --git a/go.mod b/go.mod index d712159..32877a4 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/cloudflare/app-gateway-go -go 1.17 +go 1.21 require ( github.com/DataDog/datadog-go/v5 v5.1.1