We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hey there, So I have this struct
type File struct { Sources []*Source `json:"sources"` } type Source struct { UID string `json:"uid" }
I need to ignore UID as it's dynamically generated
cmp.Equal(c.response, response, cmpopts.IgnoreFields(File{}, "UID"))
Is not doing anything. Is there a way to achieve this with this package?
Thanks!
The text was updated successfully, but these errors were encountered:
Don't you mean cmpopts.IgnoreFields(Source, "UID)? as the "UID" field is declared on the Source type rather than the File type?
cmpopts.IgnoreFields(Source, "UID)
Source
File
Sorry, something went wrong.
Closing as there is nothing actionable here. Feel free to comment with an update and we can reopen.
No branches or pull requests
Hey there,
So I have this struct
I need to ignore UID as it's dynamically generated
Is not doing anything. Is there a way to achieve this with this package?
Thanks!
The text was updated successfully, but these errors were encountered: