Enable the pre-commit hook:
git config core.hooksPath .githooksInstall golangci-lint:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latestThe pre-commit hook runs automatically on staged .go files:
gofmt -s- Format checkgolangci-lint- Lintinggo test- Testsgo build- Build verification
# Format
gofmt -s -w .
# Lint
golangci-lint run ./...
# Test
make test
# Build
make