-
Notifications
You must be signed in to change notification settings - Fork 0
feat(xstructs): custom tags #14
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
Conversation
Does providing a list of tags: |
What behavior would be desired if tags were
This might be the desired behavior 🤔 |
Yes, if, for example, you define the tags as xstructs.WithTags("yaml", "json"), but some struct fields (or all) do not contain |
This is the behaviour using the default tag ordering (of json before yaml). If, instead, the desired result is to return:
Use |
Adding support for custom tag ordering, allowing consumers to decide which tags should be considered and in which order.
Previously, consumers using e.g.
would see
B
omitted, as it prioritised JSON tags over YAML tags.Now consumers can use:
To prioritise YAML tags over JSON tags.