Documentation
¶
Overview ¶
Package envcompat lets the process accept ZANA_* environment variables while every existing reader keeps looking at KORA_*.
ZANA_<S> is the preferred spelling of KORA_<S>. Promote copies each ZANA_<S> into KORA_<S> in the process environment before configuration is read, so no call site changes. The mapping is by prefix only: KORA_CLOUD_KORA_RELOAD_URL pairs with ZANA_CLOUD_KORA_RELOAD_URL.
An empty value counts as unset, matching how configuration readers treat it. If both spellings are set to different values, ZANA_* wins.
Nothing in this package ever logs or returns a variable's value.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Report ¶
type Report struct {
// Deprecated lists KORA_* variables in effect with no ZANA_* counterpart.
Deprecated []string
// Overridden lists ZANA_* variables whose value replaced a different
// value of the KORA_* twin.
Overridden []string
}
Report names the variables that need an operator's attention. It holds names only, never values.
func Apply ¶
Apply promotes ZANA_* variables in the real process environment and logs the resulting report to log. Call it first thing in main, before any configuration is read.