better help
This commit is contained in:
parent
9d1f97258a
commit
06da4ca080
10
README.md
10
README.md
@ -9,13 +9,19 @@ like `lookup`.
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ ./spry
|
$ ./spry
|
||||||
Usage of ./spry:
|
Usage of ./spry [Options] [Template Files]:
|
||||||
-d string
|
-d string
|
||||||
Output delimiter between template files rendered (default "---")
|
Output delimiter between template files rendered (default "---")
|
||||||
-f value
|
-f value
|
||||||
Specify a values file (JSON or YAML)
|
Specify a values file (JSON or YAML)
|
||||||
-helm
|
-helm
|
||||||
Whether to nest provided values under .Values
|
Helm compatibility: provided values will be nested under .Values
|
||||||
-set value
|
-set value
|
||||||
Set a specific value (foo.bar=spam)
|
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", "---",
|
"d", "---",
|
||||||
"Output delimiter between template files rendered",
|
"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.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) {
|
func checkErr(err error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user