Print your Go test coverage line-by-line in the form of a code diff, highlighting each line. This tool takes inspiration from Go's HTML presentation of test coverage but brings it to the terminal instead.
Getting Started
go install github.com/konradreiche/coverdiff@latest
Usage
Usage:
coverdiff [file]
Flags:
-h, --help print help text
Examples:
go test -cover -coverprofile=coverage.out
cat coverage.out | coverdiff
go test -cover -coverprofile >(coverdiff)