add usage
This commit is contained in:
parent
77f4101d74
commit
2b2b3066b6
|
@ -0,0 +1,15 @@
|
|||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func bold(str string) string {
|
||||
return fmt.Sprintf("\x1b[1m%s\x1b[0m", str)
|
||||
}
|
||||
|
||||
func success(str string) string {
|
||||
return fmt.Sprintf("\x1b[58;2;26;221;120m%s\x1b[0m", str)
|
||||
}
|
||||
|
||||
func error(str string) string {
|
||||
return fmt.Sprintf("\x1b[58;2;221;26;120m%s\x1b[0m", str)
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func usage() {
|
||||
fmt.Printf(`
|
||||
%s
|
||||
cliverage - print human-readable golang code coverage
|
||||
|
||||
%s
|
||||
%s codepath coverfile [filepath]
|
||||
|
||||
%s
|
||||
codepath
|
||||
Path to where lives your code
|
||||
|
||||
coverfile
|
||||
Path to the coverage file generated by "go test -coverprofile".
|
||||
|
||||
filepath
|
||||
Optional path to a file (relative to %s).
|
||||
|
||||
%s
|
||||
Adrien Marquès (aka. xdrm-brackets)
|
||||
`,
|
||||
bold("NAME"),
|
||||
bold("SYNOPSIS"),
|
||||
bold("cliverage"),
|
||||
bold("ARGUMENTS"),
|
||||
bold("codepath"),
|
||||
bold("AUTHORS"),
|
||||
)
|
||||
}
|
Loading…
Reference in New Issue