diff --git a/workflows/go/.github/workflows/build.yml b/workflows/go/.github/workflows/build.yml index f7b4bcef..c549f380 100644 --- a/workflows/go/.github/workflows/build.yml +++ b/workflows/go/.github/workflows/build.yml @@ -24,7 +24,15 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: "1.22" # Use the Go version specified in your go.mod file + go-version: "1.22" + + - name: Check gofmt + run: | + if [ -n "$(gofmt -l .)" ]; then + echo "The following files are not formatted properly:" + gofmt -l . + exit 1 + fi - name: Get dependencies run: go mod download