Skip to content

Commit

Permalink
Updates go format action
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronzi committed Aug 8, 2024
1 parent faa1952 commit 09e9123
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/go-formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,20 @@ jobs:
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: '1.22.5'

- name: Run GoFmt
id: gofmt-run
run: |
if ! gofmt -d backend/aashub/ > gofmt_output.txt; then
echo "Formatting issues found"
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 "The following files are not formatted:"
cat gofmt_output.txt
if: failure()
run: echo "Check formatting issues in the logs."

0 comments on commit 09e9123

Please sign in to comment.