-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Open
Labels
DevExpanything around developer experienceanything around developer experienceGoCommandcmd/gocmd/goProposalProposal-Acceptedhelp wanted
Milestone
Description
(maybe this shouldn't be a proposal, it seems trivial enough that we should just do it?)
Inspired by rakyll's suggestion in #16768.
I propose a small change to go test's "coverprofile" flag to output both the binary coverage format as well as HTML. The file extension passed in by the user would switch the output format (".html" for HTML, anything else for the existing behaviour).
This change is simple and highly unlikely to break existing users, unlike #16768, which suggests to add additional flags that overlap with "go tool cover" and can quickly descend into supporting more and more flags.
Before:
go test -coverprofile foo.out && go tool cover -html foo.out -o foo.html && rm foo.out
After:
go test -coverprofile foo.html
natefinch, nathany, urandom, Dr-Terrible, luistm and 2 moreslrz and robermorales
Metadata
Metadata
Assignees
Labels
DevExpanything around developer experienceanything around developer experienceGoCommandcmd/gocmd/goProposalProposal-Acceptedhelp wanted