Appendix E — Command cheat sheet
go run . # compile + run, no binary kept
go build -o bin/app . # produce a binary
go test ./... # run all tests
go test -race ./... # run all tests with the race detector
go test -bench=. -benchmem ./... # run benchmarks with allocation stats
go test -cover ./... # coverage percentage
go vet ./... # static correctness checks
gofmt -l . # list files that need formatting
go mod tidy # sync go.mod/go.sum with actual imports
GOOS=linux GOARCH=amd64 go build # cross-compile
go tool pprof <profile> # analyze a CPU/heap/goroutine profile
go tool trace <trace.out> # analyze a scheduler trace