Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/vet: detect bad types for calls to sort.Slice #17923
What version of Go are you using (
It's a dangerous precedent because vet is being used more and more and if it's going to take on the every possible failure, it may become too expensive to run, or at least require rearchitecture.
Besides, I'm not convinced it should assume the role of catching things that are guaranteed to fail the first time you run the program.
The frequency question still exists. At the moment the problem is purely hypothetical and, I think, unimportant.
That'd be an interesting check and I'm happy to implement it too.
But after the conversation with @robpike I think it's better to wait to see if people really make those mistakes before adding extra checks.
Keeping the code I wrote in case we ever needed