Switch to pflag instead of goptions
Objective
goptions has some issues with how it handles positional arguments. Eg, using Remainder
breaks checks for other, unsupported flags. Rather than try and use this for the 'subcommand' idea, just use pflags, and create a FlagSet
for each command. This should simplify the process quite a bit.
Thoughts
This should be relatively straight forward, and will really help with future code.
Needs
- To be reentrant. So no package level vars etc.