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

Added override tag so empty fields can still be copied if IgnoreEmpty is set #209

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

Roccoriu
Copy link

@Roccoriu Roccoriu commented Apr 7, 2024

Up until now, IgnoreEmpty will make copier ignore all zero value and nil fields. Sometimes you still want certain fields to be overridden though. This will make it so that if you set the copier:"override" tag, the field will be copied in every single case even if IgnoreEmpty is set to true. It's a convenient addition for more granular control over which fields should be copied or not.

I've also updated the docs so that the usage is clearer. This means there are usage examples for all the supported cases, including a little reference at the end with all supported tags.

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.

None yet

1 participant