-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Closed
Labels
ProposalToolProposalIssues describing a requested change to a Go tool or command-line program.Issues describing a requested change to a Go tool or command-line program.
Milestone
Description
Proposal Details
if you need multi run coverage, it seems you currently have two options. first option:
go test -cover '-test.gocoverdir' cover -run Zero
go test -cover '-test.gocoverdir' cover -run One
go tool covdata textfmt -i cover -o cover.txt
go tool cover -html cover.txtsecond option:
go test -coverprofile zero.txt -run Zero
go test -coverprofile one.txt -run One
# manually merge files
go tool cover -html cover.txtwith the first option, you are having to convert to the legacy format [1] before you can get HTML output. with the second option, it seems no current method is available for multiple runs using the text format, meaning user needs to manually combine the resulting files somehow. to that end, I propose adding a new subcommand:
go tool covdata html -i cover -o cover.html
linsite
Metadata
Metadata
Assignees
Labels
ProposalToolProposalIssues describing a requested change to a Go tool or command-line program.Issues describing a requested change to a Go tool or command-line program.
Type
Projects
Status
Incoming