by msoap

msoap / go-carpet

go-carpet - show test coverage in terminal for Go source files

211 Stars 7 Forks Last release: over 2 years ago (1.7) MIT License 167 Commits 9 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

go-carpet - show test coverage for Go source files

GoDoc Build Status Coverage Status Report Card Homebrew formula exists

To view the test coverage in the terminal, just run


It works outside of the

directory. And it works recursively for multiple packages.


option, shades of green indicate the level of coverage.

By default skip vendor directories (Godeps,vendor), otherwise use



usage: go-carpet [options] [paths]
        use more colors on 256-color terminal (indicate the level of coverage)
  -args string
        pass additional arguments for go test
  -file string
        comma-separated list of files to test (default: all)
  -func string
        comma-separated functions list (default: all functions)
        include vendor directories for show coverage (Godeps, vendor)
        only show summary for each file
        get version

For view coverage in less, use

go-carpet | less -R


From source:

go get -u github.com/msoap/go-carpet
sudo ln -s $(go env GOPATH)/bin/go-carpet /usr/local/bin/go-carpet

Download binaries from: releases (OS X/Linux/Windows)

Install from homebrew (OS X):

brew tap msoap/tools
brew install go-carpet
# update:
brew upgrade go-carpet


screen shot 2016-03-06

See also

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.