This repository was archived by the owner on Dec 28, 2024. It is now read-only.
Make all services output proper JSON #117
This file contains hidden or 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: gofmt | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
formatting: | |
name: Check Go Formatting | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.23 | |
- name: Check formatting with gofmt | |
run: | | |
unformatted=$(gofmt -l .) | |
if [[ -n "$unformatted" ]]; then | |
echo "Unformatted files detected:" | |
echo "$unformatted" | |
exit 1 | |
fi |