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 d771cf1 commit a036293Copy full SHA for a036293
.github/workflows/gofmt-check.yml
@@ -0,0 +1,31 @@
1
+name: GoFmt Check
2
+
3
+on:
4
+ pull_request:
5
+ branches:
6
+ - '**' # Escuta PRs para qualquer branch de destino
7
8
+jobs:
9
+ gofmt:
10
+ runs-on: ubuntu-latest
11
12
+ steps:
13
+ # Configura o repositório
14
+ - name: Checkout repository
15
+ uses: actions/checkout@v3
16
17
+ # Configura o ambiente Go
18
+ - name: Setup Go
19
+ uses: actions/setup-go@v4
20
+ with:
21
+ go-version: '1.20' # Ajuste a versão do Go conforme necessário
22
23
+ # Executa o gofmt para verificar formatação
24
+ - name: Run gofmt
25
+ run: |
26
+ gofmt -l .
27
+ if [ "$(gofmt -l .)" != "" ]; then
28
+ echo "⚠️ The following files need to be formatted:"
29
30
+ exit 1
31
+ fi
0 commit comments