Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Expand ¶
Expand replaces ${var} (and only that) in the string based on the mapping function. This signature is identical to the one in the Go standard library, but has a more restrictive scope with less ambiguity. The value inside ${} must match \w+ (see regexp.MatchString).
A special form of environment variable syntax is supported to allow for removing surrounding quoutes (both single and double), useful to setting numeric values in TOML/JSON config files etc. Use the "@U" suffix to signal unquoting, e.g. `"${myvar@U}"` or `'${myvar@U}'`. Note that when using the "@U" suffix, the variable expression needs to be surrounded by quoutes.
func SetEnvVars ¶
SetEnvVars sets vars on the form key=value in the oldVars slice.
func SplitEnvVar ¶
SplitEnvVar splits an env var into key and value.
Types ¶
This section is empty.