Format with Go 1.19 formatter (#3277)

* Format with Go 1.19 formatter

This allows the GoDoc to take advantage of new markup syntax introduced in Go 1.19. This does not require that our minimum supported version be bumped to Go 1.19 since the pkgsite renders our godoc regardless of supported Go version.

* Add Format check
This commit is contained in:
Aoang 2022-08-17 07:14:19 +08:00 committed by GitHub
parent b04917c53e
commit de17fb1a33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -68,6 +68,10 @@ jobs:
uses: codecov/codecov-action@v3 uses: codecov/codecov-action@v3
with: with:
flags: ${{ matrix.os }},go-${{ matrix.go }},${{ matrix.test-tags }} flags: ${{ matrix.os }},go-${{ matrix.go }},${{ matrix.test-tags }}
- name: Format
if: matrix.go-version == '1.19.x'
run: diff -u <(echo -n) <(gofmt -d .)
notification-gitter: notification-gitter:
needs: test needs: test
runs-on: ubuntu-latest runs-on: ubuntu-latest