2.7 KiB
ConfigKit v0.5.0
This minor release adds source-backed layered configuration and built-in sibling inheritance, so applications can load one complete configuration while retaining presence, source context, and explainable derivation.
Summary
LoadLayeredcombines ordered underlay groups beneath the main input, selected overlay, and explicit CLI overrides. Inputs within a group still compose strictly; precedence tiers combine mappings recursively. The main input remains the owner of the optional schema-version check.NewFilesystem(...).File(...)accepts caller-ownedfs.FSsources, andMapping(...)snapshots supported built-in values as a labeled source.Result.SourceContextandResolution.SourceContextexpose passive resource contexts for values from file-backed sources.extendsnow resolves a mapping against one named sibling after source precedence and before typed decoding. Inherited values count as explicit input. Origins, history, explanations, and redacted rendering retain the source and the structural path by which a value reached its destination. Review corrections preserve immutable nested-history evidence and bounded expansion work.
See the configuration contract, inheritance rules, and consumer examples for current behavior.
Compatibility and upgrade
This is an intentional pre-v1 incompatible minor release for configurations
that use extends as ordinary data. That key is now reserved wherever an input
mapping occurs; it is consumed before decoding. Rename any such YAML key and
corresponding Go field, then rebuild. No collection registration or opt-in flag
is available. Configurations without extends retain their existing meaning.
Applications adopting the new features may move source-backed defaults into
explicit Underlay groups, use SourceContext for relative resources, or
replace application-owned sibling merging with one extends relationship per
mapping. Adoption is optional. The maintained
named-preset example
shows inherited false and destination-local nested resolution.
Select the new module version:
go get gitea.maximumdirect.net/eric/ConfigKit@v0.5.0
The minimum Go line remains 1.25. Linux amd64 and arm64 remain the
release-validated targets; macOS remains best-effort. The YAML dependency is
unchanged at go.yaml.in/yaml/v4 v4.0.0-rc.6.