Fixes formatting in main go #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go Formatting | |
on: | |
pull_request: | |
push: | |
branches: [main] | |
paths: | |
- 'backend/aashub/**.go' | |
jobs: | |
gofmt: | |
name: GoFmt Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.22.5' | |
- name: Run GoFmt | |
id: gofmt-run | |
run: | | |
gofmt -d backend/aashub/ > gofmt_output.txt | |
if [ -s gofmt_output.txt ]; then | |
echo "Formatting issues found:" | |
cat gofmt_output.txt | |
exit 1 | |
fi | |
- name: GoFmt Output | |
if: failure() | |
run: echo "Check formatting issues in the logs." |