Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: recursively merge file and group level values #9

Merged
merged 5 commits into from
Dec 12, 2023

Conversation

cbrgm
Copy link
Owner

@cbrgm cbrgm commented Dec 12, 2023

This pull request introduces an enhancement to the mergeValues function in Structuresmith, focusing on how it handles merging of nested structures, particularly slices. Previously, when merging two maps, slices within these maps were appended, which could lead to unintended duplication of data. With this update, slices in the source map now overwrite corresponding slices in the destination map, ensuring more predictable and clear outcomes when merging complex, nested configurations.

This change is crucial for scenarios where template configurations involve arrays or lists that require a clean slate rather than an accumulation of values. This PR includes updated unit tests to validate this new behavior, ensuring that it handles various complex structures, including deeply nested maps and slices.

@cbrgm cbrgm marked this pull request as ready for review December 12, 2023 03:48
@github-actions github-actions bot merged commit 8c65b60 into main Dec 12, 2023
4 checks passed
@github-actions github-actions bot deleted the feat-merging-values branch December 12, 2023 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant