Skip to main content

Module definitions

Module definitions 

Source
Expand description

Port of internal/config/definitions.go: resolution of the top-level variables: section (literal and file-backed definitions).

Functions§

expand_variable_definitions
Resolves every variables: entry in place, in both the raw mapping and the seed the resolver is built from, so the resolver and the re-decoded config both serve resolved values. Definitions resolve against predefined variables, tool versions and the environment; they cannot reference each other. A definition takes the ${VAR:-default}, ${VAR:?message} and ${VAR:+text} operators, which config values reject. A file definition expands its path the same way, then reads the file’s content as its value.
resolve_variable_definitions
Builds the chain a definition resolves against and expands every variables: entry of raw_config in place.