gocov-html icon indicating copy to clipboard operation
gocov-html copied to clipboard

Make pretty HTML output from gocov, a coverage testing tool for Go

Gocov HTML export

This is a simple helper tool for generating HTML output from axw/gocov

Here is a screenshot:

HTML coverage report screenshot

Installation

Just type the following to install the program and its dependencies:

$ go get github.com/axw/gocov/gocov
$ go get github.com/matm/gocov-html

Usage

gocov-html can read a JSON file or read from standard input:

$ gocov test strings | gocov-html > strings.html
ok      strings 0.700s  coverage: 98.1% of statements

The generated HTML content comes along with a default embedded CSS. Use the -s flag to use a custom stylesheet:

$ gocov test net/http | gocov-html -s mystyle.css > http.html