As part of the drive to make configuration more centralized and explicit, configuration structures will be defined with yaml tags and, optionally, defaultValue tags.
The configuration package support for the default tag needs to be extended to support a defaultValue tag. The defaultValue tag should reference an exported var that holds a literal containing the complex default value to use in configuration.
The difference is that the default tag is used to provide simple values to leaf nodes while defaultValue is used to provide complex literal defaults like structures or maps. Where possible, default should be preferred but there are a handful of places where defaultValue is required.
For example, decoding
into a reference to a zero value of this structure:
where Plugins is defined as:
and DefaultPlugins is:
should result in a value that is equivalent to one that is decoded from this yaml:
Notice the default values from the DefaultPlugins var are populated.