mergo icon indicating copy to clipboard operation
mergo copied to clipboard

Add WithNoOverrideEmptyStructValues

Open cwarden opened this issue 3 years ago • 5 comments

Add option to not overwrite empty fields in destination structs if the structs are not empty.

cwarden avatar Feb 26 '21 13:02 cwarden

Hello, @cwarden! This is your first Pull Request that will be reviewed by SourceLevel, an automatic Code Review service. It will leave comments on this diff with potential issues and style violations found in the code as you push new commits. You can also see all the issues found on this Pull Request on its review page. Please check our documentation for more information.

sourcelevel-bot[bot] avatar Feb 26 '21 13:02 sourcelevel-bot[bot]

I'm not positive that this needs a new option. If it does, perhaps it should be generalized to more than structs or to depths other than zero.

Please take a look at the tests. Thoughts?

cwarden avatar Feb 26 '21 13:02 cwarden

@cwarden Sorry it took so long. The tests look fine, but I'm not sure if this PR can introduce unknown side effects. It looks you have been using your fork for a year. Did you find anything wrong during this time?

darccio avatar May 25 '22 19:05 darccio

Hi @imdario. This change has been working well for me in https://github.com/ForceCLI/force-md.

cwarden avatar May 25 '22 19:05 cwarden

This will be considered as part of v2.

darccio avatar Sep 11 '23 13:09 darccio