https://github.com/itsubaki/gocov
Go coverage reporter
https://github.com/itsubaki/gocov
coverage
Last synced: 16 days ago
JSON representation
Go coverage reporter
- Host: GitHub
- URL: https://github.com/itsubaki/gocov
- Owner: itsubaki
- License: mit
- Created: 2026-05-19T10:59:31.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-05-22T16:11:42.000Z (29 days ago)
- Last Synced: 2026-05-22T16:30:52.620Z (28 days ago)
- Topics: coverage
- Language: Go
- Homepage: https://itsubaki.github.io/gocov/
- Size: 73.2 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gocov
[](https://pkg.go.dev/github.com/itsubaki/gocov)
[](https://goreportcard.com/report/github.com/itsubaki/gocov)
[](https://github.com/itsubaki/gocov/actions)
[](https://itsubaki.github.io/gocov/)
`gocov` turns a Go coverage profile into a rich, local HTML report. Run it from the root of the Go repository that produced the profile:
```sh
go test -coverprofile=coverage.txt -covermode=atomic
gocov -f coverage.txt
```
By default it writes `coverage.html` in the current directory.
## Installation
```sh
go install github.com/itsubaki/gocov@latest
```
## Usage
```sh
gocov -f coverage.txt -o coverage.html
```
Flags:
- `-f`: path to a Go coverage profile, usually created by `go test ./... -coverprofile=coverage.txt`
- `-o`: output path for the generated HTML report
- `-root`: Go repository root; defaults to the current directory
The report is a single self-contained HTML file with summary charts, a hierarchical directory coverage pie weighted by coverable lines, directory bars, searchable file navigation, and line-level coverage highlighting.