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

strip struct tags when hashing structs for type identity #805

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

mvdan
Copy link
Member

@mvdan mvdan commented Nov 12, 2023

(see commit message)

Fixes #801.

This was a long standing TODO, and a user finally ran into it.
The fix isn't terribly straightforward, but I'm pretty happy with it.

Add a test case where the same struct field is identical
with no tag, with the "tagged1" json tag, and again with "tagged2".
While here, we add a test case for a regular named field too.

Fixes burrowers#801.
@pagran pagran merged commit 6f0e46f into burrowers:master Nov 13, 2023
5 checks passed
@mvdan mvdan deleted the patches-3 branch November 14, 2023 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

converting between struct types with different struct tags breaks
2 participants