better help
This commit is contained in:
parent
9d1f97258a
commit
06da4ca080
10
README.md
10
README.md
@ -9,13 +9,19 @@ like `lookup`.
|
||||
|
||||
```bash
|
||||
$ ./spry
|
||||
Usage of ./spry:
|
||||
Usage of ./spry [Options] [Template Files]:
|
||||
-d string
|
||||
Output delimiter between template files rendered (default "---")
|
||||
-f value
|
||||
Specify a values file (JSON or YAML)
|
||||
-helm
|
||||
Whether to nest provided values under .Values
|
||||
Helm compatibility: provided values will be nested under .Values
|
||||
-set value
|
||||
Set a specific value (foo.bar=spam)
|
||||
|
||||
Template Files can also be directories to recurse for templates.
|
||||
|
||||
If no template files are provided it will attempt read from STDIN.
|
||||
If no input is available from STDIN it will print this usage message instead.
|
||||
Pass only '-' to Template Files to force waiting for input.
|
||||
```
|
||||
|
30
main.go
30
main.go
@ -88,8 +88,36 @@ func init() {
|
||||
"d", "---",
|
||||
"Output delimiter between template files rendered",
|
||||
)
|
||||
flag.BoolVar(&flags.helmCompat, "helm", false, "Whether to nest provided values under .Values")
|
||||
flag.BoolVar(
|
||||
&flags.helmCompat,
|
||||
"helm", false,
|
||||
"Helm compatibility: provided values will be nested under .Values",
|
||||
)
|
||||
flag.Parse()
|
||||
|
||||
flag.Usage = func() {
|
||||
fmt.Fprintf(flag.CommandLine.Output(), "Usage of %s [Options] [Template Files]:\n", os.Args[0])
|
||||
flag.PrintDefaults()
|
||||
fmt.Fprintf(flag.CommandLine.Output(), "\n")
|
||||
fmt.Fprintf(
|
||||
flag.CommandLine.Output(),
|
||||
"Template Files can also be directories to recurse for templates.\n",
|
||||
)
|
||||
fmt.Fprintf(flag.CommandLine.Output(), "\n")
|
||||
fmt.Fprintf(
|
||||
flag.CommandLine.Output(),
|
||||
"If no template files are provided it will attempt read from STDIN.\n",
|
||||
)
|
||||
fmt.Fprintf(
|
||||
flag.CommandLine.Output(),
|
||||
"If no input is available from STDIN it will print this usage message instead.\n",
|
||||
)
|
||||
fmt.Fprintf(
|
||||
flag.CommandLine.Output(),
|
||||
"Pass only '-' to Template Files to force waiting for input.\n",
|
||||
)
|
||||
fmt.Fprintf(flag.CommandLine.Output(), "\n")
|
||||
}
|
||||
}
|
||||
|
||||
func checkErr(err error) {
|
||||
|
Loading…
Reference in New Issue
Block a user