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

protocmp: how to ignore field in one of? #1506

Open
HartBlanc opened this issue Dec 20, 2022 · 2 comments
Open

protocmp: how to ignore field in one of? #1506

HartBlanc opened this issue Dec 20, 2022 · 2 comments

Comments

@HartBlanc
Copy link

I have a message M with a Oneof field O, one of the values O can take Ox has a field F.

I want to ignore F in a comparison.

I'm unable to address the field without either getting a panic or a compilation error using either protocmp.IgnoreFields or protocmp.IgnoreOneofs.

How can I ignore F in a cmp.Equal comparison?

@stapelberg
Copy link

Could you please supply a runnable program to illustrate the issue? Thanks.

@puellanivis
Copy link
Collaborator

Also, what panics / compilation errors are you seeing? We can help significantly faster and better when we know exactly what issue you’re facing.

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

No branches or pull requests

3 participants