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

Suggestion: option to restrict comparable to only exported values. #136

Open
dmichmer opened this issue Apr 9, 2024 · 1 comment
Open

Comments

@dmichmer
Copy link

dmichmer commented Apr 9, 2024

I use the testify/assert package in unit testing and they have a very helpful ability to compare two structs based only on exported values. This makes it possible for me to compare GRPC generated structs which have (generated) internal members that differ.

https://pkg.go.dev/github.com/stretchr/testify/assert#EqualExportedValues

This would be a very useful option for constructing sets as well.

@deckarep
Copy link
Owner

Hi,

Thanks for the comment but I do largely consider this package to be neutral to other testing packages aside from Go's standard lib flavor of testing.

I know testify is popular and I've used it before in some projects but would such a change be applicable to other projects, people and usages of this repo?

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

2 participants