Skip to content
This repository has been archived by the owner before Nov 9, 2022. It is now read-only.

pierrre/gotestcover

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

Go test cover with multiple packages support

Deprecated

Just use this script instead:

echo 'mode: atomic' > coverage.txt && go list ./... | xargs -n1 -I{} sh -c 'go test -covermode=atomic -coverprofile=coverage.tmp {} && tail -n +2 coverage.tmp >> coverage.txt' && rm coverage.tmp

It's easier to customize, gives you better control, and doesn't require to download a third-party tool.

The repository will remain, but I will not update it anymore. If you want to add new features, create a new fork.

Features

  • Coverage profile with multiple packages (go test doesn't support that)

Install

go get github.com/pierrre/gotestcover

Usage

gotestcover -coverprofile=cover.out mypackage
go tool cover -html=cover.out -o=cover.html

Run on multiple package with:

  • package1 package2
  • package/...

Some go test / build flags are available.

About

Go test cover with multiple packages support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •