28 lines
2.4 KiB
Go
28 lines
2.4 KiB
Go
package wand
|
|
|
|
const envDocs = `Every command line option's value can also be provided as an environment variable. Environment variable
|
|
names need to use snake casing like myapp_foo_bar_baz or MYAPP_FOO_BAR_BAZ, or other casing that doesn't include the '-' dash
|
|
character, and they need to be prefixed with the name of the application, as in the base name of the command. When both the
|
|
environment variable and the command line option is defined, the command line option overrides the environment variable.
|
|
Multiple values for the same environment variable can be defined by concatenating the values with the ':' separator
|
|
character. When overriding multiple values with command line options, all the environment values of the same field are
|
|
dropped.`
|
|
|
|
const configOptionDocs = `the config option allows to define zero or more configuration files at arbitrary path`
|
|
|
|
const configDocs = `Every command line option's value can also be provided as an entry in a configuration file. Configuration
|
|
file entries can use keys with different casings, e.g. snake case foo_bar_baz, or kebab case foo-bar-baz. The keys of the
|
|
entries can use a limited set of characters: [a-zA-Z0-9_-], and the first character needs to be one of [a-zA-Z_]. Entry
|
|
values can consist of any characters, except for newline, control characters, " (quote) and \ (backslash), or the values can
|
|
be quoted, in which case they can consist of any characters, spanning multiple lines, and only the " (quote) and \ (backslash)
|
|
characters need to be escaped by the \ (backslash) character. Configuration files allow multiple entries with the same key,
|
|
when if the associated command line option also allows multiple instances (marked with [*]). When an entry is defined
|
|
multiple configuration files, the effective value is overridden in the order of the definition of the possible config files
|
|
(see the listing order below). To discard values defined in the overridden config files without defining new ones, we can
|
|
set entries with only the key, omitting the = key/value separator. Entries in the config files are overridden by the
|
|
environment variables, when defined, and by the command line options when defined. Config files marked as optional don't
|
|
need to be present in the file system, but if they exist, then they must contain valid configuration syntax which is wand's
|
|
flavor of .ini files (https://code.squareroundforest.org/arpio/ini.treerack).`
|
|
|
|
const versionDocs = `Print the version of the current binary release.`
|