Skip to content

Instantly share code, notes, and snippets.

@alanshaw
Last active September 18, 2024 09:21
Show Gist options
  • Save alanshaw/2941c8673fab9b32b2d43d18fa341cf9 to your computer and use it in GitHub Desktop.
Save alanshaw/2941c8673fab9b32b2d43d18fa341cf9 to your computer and use it in GitHub Desktop.
Golang coverage
go test -coverprofile=c.out -v ./...
go tool cover -html="c.out"
# or
go install github.com/cancue/covreport@latest
go test -coverprofile=c.out -v ./...
~/go/bin/covreport -i c.out
open cover.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment