Test coverage

Run go test with the -cover flag to measure code coverage and generate a report.

Run go test ./... to execute all tests in your module and see coverage results. Add the -cover flag to measure code coverage, and -coverprofile=coverage.out to save the data for analysis.

go test -cover ./...

To view a detailed HTML report, generate the profile and open it:

go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.out