Implement merging strategies
Opened this issue · 0 comments
frank-lenormand commented
Related to #14.
It would be nice to be able to specify a merging strategy to guide Confight as to what its expected behaviour would be when merging two dictionaries.
Examples include:
- merging lists
- ignoring the right hand value if the left hand value isn’t set (i.e. only update, no upsert)
- replacing the entire left hand dictionary with an existing right hand dictionary (i.e. the default behaviour of
{**left, **right}
) - matcher objects that dynamically set a strategy, predicated on the current key/dictionary being processed