Skip to content

fix: update go format #3

fix: update go format

fix: update go format #3

Workflow file for this run

name: Go Format Check
on:
push:
pull_request:
workflow_dispatch:
jobs:
gofmt:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
# - name: Install golangci-lint
# run: |
# curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.50.1
# - name: Run golangci-lint
# run: golangci-lint run
- name: Check Go format
run: |
if [ -n "$(gofmt -l .)" ]; then
echo "Go code is not formatted:"
gofmt -d .
exit 1
else
echo "Go code is properly formatted"
fi