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/compile: the compiler should probably recognize runtime.Goexit #37193
What version of Go are you using (
The relevant bit of the spec is https://golang.org/ref/spec#Terminating_statements. I’d personally be reluctant to add runtime.Goexit; everything else in that list is lower level.
It is important for vet to use the same set of terminating statements as the compiler. Otherwise you’ll be forced to add a terminating statement in some cases (like this) to make your code compile but vet will then complain about it.
The definition of "terminating statements" is based strictly on properties of the language spec (which are unlikely to change), not APIs (which may change).
Also, even if we added
Not really a proposal, but leaving open for a decision by the proposal review commitee.