Package flag implements command-line flag parsing in the GNU style. It is almost exactly the same as the standard flag package, the only difference being the extra argument to Parse.
Command line flag syntax:
-f // single letter flag -fg // two single letter flags together --flag // multiple letter flag --flag x // non-boolean flags only -f x // non-boolean flags only -fx // if f is a non-boolean flag, x is its argument.
The last three forms are not permitted for boolean flags because the meaning of the command
cmd -f *
will change if there is a file called 0, false, etc. There is currently no way to turn off a boolean flag.
Flag parsing stops after the terminator "--", or just before the first non-flag argument ("-" is a non-flag argument) if the interspersed argument to Parse is false.