Skip to content

Workflow

Workflow #4

Workflow file for this run

name: Check Go Format
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
go-fmt-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Run gofmt
run: |
gofmt -l .
if [ ! -z "$(gofmt -l .)" ]; then
echo "Go files are not formatted correctly."
exit 1
fi