We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 376457e commit 8b350d5Copy full SHA for 8b350d5
.github/workflows/format.yaml
@@ -0,0 +1,31 @@
1
+# .github/workflows/gofmt.yml
2
+name: Gofmt Check
3
+
4
+on:
5
+ push:
6
+ branches:
7
+ - '**'
8
9
+jobs:
10
+ gofmt:
11
+ name: Run gofmt
12
+ runs-on: ubuntu-latest
13
14
+ steps:
15
+ - name: Checkout code
16
+ uses: actions/checkout@v3
17
18
+ - name: Set up Go
19
+ uses: actions/setup-go@v4
20
+ with:
21
+ go-version: '1.24.2'
22
23
+ - name: Check formatting with gofmt
24
+ run: |
25
+ unformatted=$(gofmt -l .)
26
+ if [ -n "$unformatted" ]; then
27
+ echo "The following files are not properly formatted:"
28
+ echo "$unformatted"
29
+ echo "Run 'gofmt -w .' to fix them."
30
+ exit 1
31
+ fi
0 commit comments