mirror of
https://github.com/google/go-jsonnet.git
synced 2026-05-05 03:56:11 +02:00
jsonnet --help: separate sections more clearly
This commit is contained in:
parent
d767ab7bf5
commit
e71d28e7c2
@ -53,33 +53,36 @@ func usage(o io.Writer) {
|
||||
fmt.Fprintln(o, " -s / --max-stack <n> Number of allowed stack frames")
|
||||
fmt.Fprintln(o, " -t / --max-trace <n> Max length of stack trace before cropping")
|
||||
fmt.Fprintln(o, " --version Print version")
|
||||
fmt.Fprintln(o)
|
||||
fmt.Fprintln(o, "Available options for specifying values of 'external' variables:")
|
||||
fmt.Fprintln(o, "Provide the value as a string:")
|
||||
fmt.Fprintln(o, " Provide the value as a string:")
|
||||
fmt.Fprintln(o, " -V / --ext-str <var>[=<val>] If <val> is omitted, get from environment var <var>")
|
||||
fmt.Fprintln(o, " --ext-str-file <var>=<file> Read the string from the file")
|
||||
fmt.Fprintln(o, "Provide a value as Jsonnet code:")
|
||||
fmt.Fprintln(o, " Provide a value as Jsonnet code:")
|
||||
fmt.Fprintln(o, " --ext-code <var>[=<code>] If <code> is omitted, get from environment var <var>")
|
||||
fmt.Fprintln(o, " --ext-code-file <var>=<file> Read the code from the file")
|
||||
fmt.Fprintln(o)
|
||||
fmt.Fprintln(o, "Available options for specifying values of 'top-level arguments':")
|
||||
fmt.Fprintln(o, "Provide the value as a string:")
|
||||
fmt.Fprintln(o, " Provide the value as a string:")
|
||||
fmt.Fprintln(o, " -A / --tla-str <var>[=<val>] If <val> is omitted, get from environment var <var>")
|
||||
fmt.Fprintln(o, " --tla-str-file <var>=<file> Read the string from the file")
|
||||
fmt.Fprintln(o, "Provide a value as Jsonnet code:")
|
||||
fmt.Fprintln(o, " Provide a value as Jsonnet code:")
|
||||
fmt.Fprintln(o, " --tla-code <var>[=<code>] If <code> is omitted, get from environment var <var>")
|
||||
fmt.Fprintln(o, " --tla-code-file <var>=<file> Read the code from the file")
|
||||
fmt.Fprintln(o)
|
||||
fmt.Fprintln(o, "Environment variables:")
|
||||
fmt.Fprintln(o, "JSONNET_PATH is a colon (semicolon on Windows) separated list of directories added")
|
||||
fmt.Fprintln(o, "in reverse order before the paths specified by --jpath (i.e. left-most wins)")
|
||||
fmt.Fprintln(o, "E.g. JSONNET_PATH=a:b jsonnet -J c -J d is equivalent to:")
|
||||
fmt.Fprintln(o, "JSONNET_PATH=d:c:a:b jsonnet")
|
||||
fmt.Fprintln(o, "jsonnet -J b -J a -J c -J d")
|
||||
fmt.Fprintln(o, " JSONNET_PATH is a colon (semicolon on Windows) separated list of directories added")
|
||||
fmt.Fprintln(o, " in reverse order before the paths specified by --jpath (i.e. left-most wins)")
|
||||
fmt.Fprintln(o, " E.g. JSONNET_PATH=a:b jsonnet -J c -J d is equivalent to:")
|
||||
fmt.Fprintln(o, " JSONNET_PATH=d:c:a:b jsonnet")
|
||||
fmt.Fprintln(o, " jsonnet -J b -J a -J c -J d")
|
||||
fmt.Fprintln(o)
|
||||
fmt.Fprintln(o, "In all cases:")
|
||||
fmt.Fprintln(o, "<filename> can be - (stdin)")
|
||||
fmt.Fprintln(o, "Multichar options are expanded e.g. -abc becomes -a -b -c.")
|
||||
fmt.Fprintln(o, "The -- option suppresses option processing for subsequent arguments.")
|
||||
fmt.Fprintln(o, "Note that since filenames and jsonnet programs can begin with -, it is advised to")
|
||||
fmt.Fprintln(o, "use -- if the argument is unknown, e.g. jsonnet -- \"$FILENAME\".")
|
||||
fmt.Fprintln(o, " <filename> can be - (stdin)")
|
||||
fmt.Fprintln(o, " Multichar options are expanded e.g. -abc becomes -a -b -c.")
|
||||
fmt.Fprintln(o, " The -- option suppresses option processing for subsequent arguments.")
|
||||
fmt.Fprintln(o, " Note that since filenames and jsonnet programs can begin with -, it is advised to")
|
||||
fmt.Fprintln(o, " use -- if the argument is unknown, e.g. jsonnet -- \"$FILENAME\".")
|
||||
}
|
||||
|
||||
func safeStrToInt(str string) (i int) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user