Skip to content

Feat: Add option to skip confirmations #16

Feat: Add option to skip confirmations

Feat: Add option to skip confirmations #16

Workflow file for this run

name: Format
on:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
contents: read
jobs:
format:
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.24.1'
- name: Check gofmt
run: |
if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then
echo "The following files are not formatted:"
gofmt -s -l .
echo "Please run 'gofmt -s -w .' to fix formatting issues."
exit 1
fi
- name: Check goimports
run: |
go install golang.org/x/tools/cmd/goimports@latest
if [ "$(goimports -l . | wc -l)" -gt 0 ]; then
echo "The following files have import issues:"
goimports -l .
echo ""
echo "To fix these import issues, run:"
echo "goimports -w ."
exit 1
fi