diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index e3ee780..8ba8ece 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -15,6 +15,15 @@ jobs: uses: actions/setup-go@v5 with: go-version: '1.22' + - name: Format check + run: | + if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then + echo "Code is not formatted. Run 'go fmt ./...'" + gofmt -s -l . + exit 1 + fi + - name: Vet + run: go vet ./... - name: Build run: go build -v ./... - name: Test