Expand description
Environment-variable reading and ${VAR} / ${VAR:-default} interpolation.
A single primitive shared by every config surface that expands placeholders:
the profile loader interpolates a whole YAML document against the process
environment, and the services config layer drives interpolate in a
multi-pass loop over a secrets→env→vars source chain. Both reuse the one
regex and the one unresolved-placeholder rule defined here, so the syntax
never drifts between surfaces.
Functions§
- contains_
placeholder - Reports whether
inputstill contains a${VAR}/${VAR:-default}placeholder. Used by multi-pass resolvers to detect non-convergence. - interpolate
- Replaces every
${VAR}/${VAR:-default}occurrence ininputusinglookup. - read_
env_ optional - Reads an environment variable, treating empty as absent.