go test -v ./...- -v → Shows detailed output for each test run
- ./... → Runs all tests in every folder
go test -v -cover -coverprofile=coverage ./...- Shows coverage per function and the overall total
go tool cover -html=coverage- Opens the coverage report in the browser
- Green 🟩 lines = covered code (tested)
- Red 🟥 lines = code not covered (untested)
- Gray 🩶 lines = lines not executed directly, such as comments, struct/interface declarations, or function signatures
go tool cover -html=coverage -o coverage.html- Creates coverage.html in the project root