1.1 KiB
1.1 KiB
description, globs, alwaysApply
| description | globs | alwaysApply |
|---|---|---|
| Standard Go development commands for this project | **/*.go | false |
Go Development Commands
Testing
# Run all tests
go test ./...
# Run tests in a specific package
go test ./internal/checkin/...
# Run a single test by name
go test ./internal/checkin/... -run TestCheckOut
# Run tests with verbose output
go test -v ./...
# Run tests with race detector
go test -race ./...
Formatting and Linting
# Format all Go files
gofmt -w .
# Organize imports (group stdlib, external, internal)
goimports -w .
# Vet for common mistakes
go vet ./...
Code Generation
# Regenerate sqlc query code after editing internal/store/queries/*.sql
task sqlc
# Regenerate proto/gRPC code after editing .proto files
task generate
Building
# Compile all packages (catches errors without producing binaries)
go build ./...
# Tidy module dependencies after adding/removing imports
go mod tidy
After any code change
gofmt -w .goimports -w .(if imports changed)go vet ./...go test ./...