update usage using flags

This commit is contained in:
Adrien Marquès 2019-11-22 23:05:27 +01:00
parent 2b2b3066b6
commit df9f300ff8
2 changed files with 9 additions and 9 deletions

View File

@ -30,10 +30,10 @@ In order for the `cliverage` tool to run successfully, you need :
Command usage :
```bash
cliverage <path-to-code> <coverage-file> <file-path>
cliverage -d <code-path> -c <cover-file> [-f <file-path>]
```
Arguments :
- `<path-to-code>` - path to where your code lives
- `coverage-file` - path to the coverage file
- `<file-path>` - path to a single file. You can use go package wildcards : `./...` prints every file, `./a/b/...` prints every file located into `./a/b`.
- `<code-path>` - path to where your code lives
- `cover-file` - path to the coverage file
- `-f <file-path>` - path to a single file. You can use go package wildcards : `./...` prints every file, `./a/b/...` prints every file located into `./a/b`.

View File

@ -8,16 +8,16 @@ func usage() {
cliverage - print human-readable golang code coverage
%s
%s codepath coverfile [filepath]
%s -d codepath -c coverfile [-f filepath]
%s
codepath
-d codepath
Path to where lives your code
coverfile
-c coverfile
Path to the coverage file generated by "go test -coverprofile".
filepath
-f filepath
Optional path to a file (relative to %s).
%s
@ -26,7 +26,7 @@ func usage() {
bold("NAME"),
bold("SYNOPSIS"),
bold("cliverage"),
bold("ARGUMENTS"),
bold("OPTIONS"),
bold("codepath"),
bold("AUTHORS"),
)