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
Currently, non-flag arguments must come after the flag arguments like:
./prog -x 1 arg1 arg2
(flag.NArg() == 2)
I'd like to be able to parse arguments like:
./prog arg1 arg2 -x 1
and have flag.NArg() return 2 instead of 4. The -x arg should also be parsed into a flag
variable.
The text was updated successfully, but these errors were encountered:
This was a deliberate design decision. Historically command line
option parsers did not accepted flags everywhere on the command line.
Some now do, so there are two standards that could be used. Go uses
the original one.
by emilliken:
The text was updated successfully, but these errors were encountered: