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

Strings in struct fields are not compared correctly #59

Open
klyubavsky opened this issue Jun 1, 2023 · 2 comments
Open

Strings in struct fields are not compared correctly #59

klyubavsky opened this issue Jun 1, 2023 · 2 comments

Comments

@klyubavsky
Copy link

As subj states looks like strings in struct fields are not compared:

		if diff := deep.Equal(struct{ foo string }{foo: "aa"}, struct{ foo string }{foo: "aab"}); diff != nil {
			t.Error(diff)
		}

will pass without error

@daniel-nichter
Copy link
Member

daniel-nichter commented Jun 2, 2023

Does it work if you set CompareUnexportedFields = true?

@klyubavsky
Copy link
Author

klyubavsky commented Jun 5, 2023

Oh, sorry, didn't know that it is disabled by default :)
Please resolve the issue.
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants