Skip to content

Commit

Permalink
Update to Go 1.21
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tgeoghegan committed May 29, 2024
1 parent 954b26e commit f608107
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 ./...
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20-bookworm as build
FROM golang:1.21-bookworm as build

WORKDIR /app

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/cloudflare/app-gateway-go

go 1.17
go 1.21

require (
github.com/DataDog/datadog-go/v5 v5.1.1
Expand Down

0 comments on commit f608107

Please sign in to comment.