From 9a108c1953290163d2104befba4a340b5f553001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Tue, 15 Aug 2023 11:48:40 +0200 Subject: [PATCH] add Go 1.21, drop 1.19 --- .github/workflows/test.yml | 6 +++--- README.md | 4 ++-- go.mod | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1d34796..794c448 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,7 @@ jobs: test: strategy: matrix: - go-version: [1.19.x, 1.20.x] + go-version: [1.20.x, 1.21.x] os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: @@ -17,7 +17,7 @@ jobs: # Static checks from this point forward. Only run on one Go version and on # Linux, since it's the fastest platform, and the tools behave the same. - - if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.20.x' + - if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.21.x' run: diff <(echo -n) <(gofmt -s -d .) - - if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.20.x' + - if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.21.x' run: go vet ./... diff --git a/README.md b/README.md index a0206ef..a70d754 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Enforce a stricter format than `gofmt`, while being backwards compatible. That is, `gofumpt` is happy with a subset of the formats that `gofmt` is happy with. -The tool is a fork of `gofmt` as of Go 1.20, and requires Go 1.19 or later. +The tool is a fork of `gofmt` as of Go 1.21, and requires Go 1.20 or later. It can be used as a drop-in replacement to format your Go code, and running `gofmt` after `gofumpt` should produce no changes. For example: @@ -15,7 +15,7 @@ For example: gofumpt -l -w . Some of the Go source files in this repository belong to the Go project. -The project includes copies of `go/printer` and `go/doc/comment` as of Go 1.20 +The project includes copies of `go/printer` and `go/doc/comment` as of Go 1.21 to ensure consistent formatting independent of what Go version is being used. The [added formatting rules](#Added-rules) are implemented in the `format` package. diff --git a/go.mod b/go.mod index 46b2c0a..68151e5 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module mvdan.cc/gofumpt -go 1.19 +go 1.20 require ( github.com/frankban/quicktest v1.14.5