Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFlag ¶
AddFlag adds the magic flag that enables the environment variable parsing feature. See SetFlagsFromEnvironment for more information.
func SetFlagsFromEnvironment ¶
SetFlagsFromEnvironment is enabled/configured by a user setting the magic flag in `flagsFromEnvironmentPrefixFlag`. If set, this function looks for the value of each *other* flag in the environment, and updates the given flags as if any found values we passed on the command line.
For example, if the magic flag was set to "PARAM_", and the flags contained a flag named "foo-bar", this function would look for a variable named "PARAM_FOO_BAR". There is some type coercion borrowed from the Cobra CLI framework, so if "foo-bar" was a boolean flag, it could be set with "PARAM_FOO_BAR=true", "PARAM_FOO_BAR=1", and so on.
This function can't help set positional arguments, it only helps with flags.
This function largely exists so that tools like ArgoCD that want to run Thelma with configuration in the environment can do so without needing a wrapper script.
Types ¶
This section is empty.