https://github.com/uudashr/gofilecov
Golang File Test coverage
https://github.com/uudashr/gofilecov
golang tool
Last synced: about 1 year ago
JSON representation
Golang File Test coverage
- Host: GitHub
- URL: https://github.com/uudashr/gofilecov
- Owner: uudashr
- Created: 2019-02-21T07:33:09.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-29T09:04:20.000Z (about 7 years ago)
- Last Synced: 2025-02-08T08:47:30.218Z (over 1 year ago)
- Topics: golang, tool
- Language: Go
- Size: 4.88 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Go File Coverage
This is Go tool to read coverage profile and show the coverage reports on file basis.
## Why?
On legacy service, it's is hard to add unit test for the whole repository/package. This is why `gofilecov` created, so we can cover only for modified files.
## Installation
`$ go get github.com/uudashr/gofilecov`
## Usage
```
$ gofilecov
Usage of gofilecov:
-coverprofile string
Coverage profile
-format string
Output format (default "{{ .FileName }};{{ .Coverage }}")
```
### Example
```
$ gofilecov -coverprofile=cover.out
github.com/uudashr/catalog/internal/app/service.go;71.42857
github.com/uudashr/catalog/internal/http/handler.go;66.66667
github.com/uudashr/catalog/internal/inmem/category.go;71.42857
github.com/uudashr/catalog/internal/inmem/product.go;71.42857
github.com/uudashr/catalog/internal/product/category.go;40
github.com/uudashr/catalog/internal/product/product.go;40
```