gocrest
gocrest copied to clipboard
does a NoError() matcher make sense?
Hi,
since foo, err := bar()
is a typical go style, I wonder, if a NoError() matcher would make sense to add?
Example
foo, err := bar()
then.assertThat(t, err, is.NoError())
What do you think? I would be open to create a PR ... but would like to get your view first :)
Thanks for your idea.
I think this would be fine. You could implement it as a wrapper around is.not(is.nil())
. Go for it 👍
Edit: it might be better as has.NoError()
My motivation for contribution is too low as of now ... closing this issue ... anyone else is free to pick it up :)