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 : Command usage :
```bash ```bash
cliverage <path-to-code> <coverage-file> <file-path> cliverage -d <code-path> -c <cover-file> [-f <file-path>]
``` ```
Arguments : Arguments :
- `<path-to-code>` - path to where your code lives - `<code-path>` - path to where your code lives
- `coverage-file` - path to the coverage file - `cover-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`. - `-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 cliverage - print human-readable golang code coverage
%s %s
%s codepath coverfile [filepath] %s -d codepath -c coverfile [-f filepath]
%s %s
codepath -d codepath
Path to where lives your code Path to where lives your code
coverfile -c coverfile
Path to the coverage file generated by "go test -coverprofile". Path to the coverage file generated by "go test -coverprofile".
filepath -f filepath
Optional path to a file (relative to %s). Optional path to a file (relative to %s).
%s %s
@ -26,7 +26,7 @@ func usage() {
bold("NAME"), bold("NAME"),
bold("SYNOPSIS"), bold("SYNOPSIS"),
bold("cliverage"), bold("cliverage"),
bold("ARGUMENTS"), bold("OPTIONS"),
bold("codepath"), bold("codepath"),
bold("AUTHORS"), bold("AUTHORS"),
) )