-
Notifications
You must be signed in to change notification settings - Fork 209
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
Readability of cmp.Diff function #328
Comments
I don't think this is going to change. This was discussed in the early days of Feel free to create a package that simply wraps |
For the record, I was in support of
The Go style guide remains ambiguous about what direction to use. Although, it seems to suggest |
And also, while "got" and "want" make sense in tests, Perhaps there should be a test-specific diff API with named parameters:
|
|
When it comes to |
I found cmp.Diff example in google styling guide, I think it can be enforced pretty well if not, should be suggested on README.md perhaps, I will also check out other testing libraries and come back with my findings for - + or + - https://google.github.io/styleguide/go/best-practices#tests but you are absolutely right equality shouldn't care about want and got, it takes 2 numbers and return bool perhaps at the end of the day + - and - + doesn't matter at all, just like yaml or yml where you stick one and in that repo everyone uses that side (aka eventual consistency) |
I believe we can make the readability of the Diff function output very much by just adding
(-want +got)
The text was updated successfully, but these errors were encountered: