mirror of
https://github.com/taigrr/jety.git
synced 2026-04-02 03:19:03 -07:00
The documented precedence is Set > env > file > defaults, but collapse() was using maps.Copy(ccm, mapConfig) which let file values (and Set values, stored in the same map) unconditionally overwrite env values. Split mapConfig into fileConfig (from ReadInConfig) and overrideConfig (from Set/SetString/SetBool). collapse() now applies layers in correct order: defaults, then file, then env (for known keys), then overrides. Added TestPrecedenceChain to verify the full layering.
6.4 KiB
6.4 KiB