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: reject flag.Parse during func init #33190
We could add a special runtime hook of some kind to allow flag to see whether main.main has started, but that would be unfortunate.
A vet check, on by default during go test, seems like the perfect compromise to me.