You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently @alandonovan replaced -vettool with $GOVETTOOL because it simplified command line parsing a little. We should undo that. An environment variable is not appropriate for per-command configuration - that's what the command line is for - and the parsing of -vettool can run the tool to learn the other flags.
The text was updated successfully, but these errors were encountered:
The problem that the environment variable solves is that by the time you parse the -vettool flag, it's too late to run that tool to report its flags because you've already started parsed the command line.
An alternative might be to implement an ad-hoc command-line parser that searches for -vettool or -vettool=... among os.Args and ignores all other arguments. It's not 100% correct w.r.t. flag parsing semantics but it might be good enough.
Recently @alandonovan replaced -vettool with $GOVETTOOL because it simplified command line parsing a little. We should undo that. An environment variable is not appropriate for per-command configuration - that's what the command line is for - and the parsing of -vettool can run the tool to learn the other flags.
The text was updated successfully, but these errors were encountered: