initial commit
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
name: Format
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "**"
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
gofmt:
|
||||
name: gofmt
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
cache: true
|
||||
|
||||
- name: Verify formatting
|
||||
shell: bash
|
||||
run: |
|
||||
files="$(gofmt -l .)"
|
||||
if [[ -n "${files}" ]]; then
|
||||
echo "These files need formatting:"
|
||||
echo "${files}"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user