cmd/vet: vet should recommend to use operators instead of strings.Compare
to compare strings
#50209
Labels
FrozenDueToAge
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What did you do?
What did you expect to see?
warning that
strings.Compare(x, y) == 0
is slower thanx == y
for some cases.By the current(sorry, there are still some cases thestrings.Compare
implementation, all calls to this functions should be warned.strings.Compare
way is more performant)What did you see instead?
Nothing outputted.
The text was updated successfully, but these errors were encountered: