Skip to content

Commit

Permalink
chore: compile with Go 1.22 (#872)
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Feb 16, 2024
1 parent 38784ae commit ed8816d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.22'
cache-dependency-path: |
go.sum
caddy/go.sum
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.22'
cache-dependency-path: |
go.sum
caddy/go.sum
Expand All @@ -37,10 +37,13 @@ jobs:
test:
strategy:
matrix:
go: [ '1.20', '1.21' ]
go: [ '1.20', '1.21', '1.22' ]
fail-fast: false
name: Test
runs-on: ubuntu-latest
env:
# Temporary workaround for https://github.com/golang/go/issues/65653
GOEXPERIMENT: nocoverageredesign
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions tests/use-go-deadlock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

SEP="\n\t"
args=( "-i" )
if [ "$(uname)" = "Darwin" ]; then
if [[ "$(uname)" = "Darwin" ]]; then
SEP=$'\\\n\\\t'
args=( "-i" "" )
fi

GO111MODULE=off go get golang.org/x/tools/cmd/goimports
go install golang.org/x/tools/cmd/goimports@latest
find . -name "*.go" -exec sed "${args[@]}" -e "s#\"sync\"#\"sync\"${SEP}deadlock \"github.com/sasha-s/go-deadlock\"#" {} \;
find . -name "*.go" -exec sed "${args[@]}" -e 's#sync.RWMutex#deadlock.RWMutex#' {} {} \;
find . -name "*.go" -exec sed "${args[@]}" -e 's#sync.Mutex#deadlock.Mutex#' {} {} \;
Expand Down

0 comments on commit ed8816d

Please sign in to comment.