Closed pohly closed 9 months ago
I've not checked whether this is already supported - at least the version in the latest golangci-lint doesn't seem to have it.
Hi @pohly, thanks for this idea. I think many developers will find go Equal("") better readable than BeEmpty().
It like in a regular go condition, that many developers prefer
if s == ""
Over
if len(s) == 0
This is why I'm not sure about it. Do you want to open a discussion in the ginkgo slack channel?
Yes, let's do that.
This proposal is too contentious, let's not do it.
Is your feature request related to a problem? Please describe.
Instead of
BeEqual("")
it would be better to useBeEmpty()
. It supports strings and makes the intent and failure message clearer.Additional context
https://github.com/kubernetes/kubernetes/pull/120403#pullrequestreview-1623915358