From db855d4eccc9ee3472ab88a0bc62bf5c8f485ac1 Mon Sep 17 00:00:00 2001 From: Peter Rounce Date: Sun, 29 Jan 2023 10:51:46 +0000 Subject: [PATCH] add go format checking --- .github/workflows/go.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 3e9a76d..d245f07 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,5 +1,5 @@ -# This workflow will build a golang project -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go +# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go +# https://github.com/marketplace/actions/check-code-formatting-using-gofmt name: Go @@ -11,6 +11,7 @@ on: jobs: + build: runs-on: ubuntu-latest steps: @@ -21,6 +22,12 @@ jobs: with: go-version: 1.19 + - name: Check formatting + uses: Jerome1337/gofmt-action@v1.0.5 + with: + gofmt-path: './...' + gofmt-flags: '-l -d' + - name: Build run: go build -v ./...