Quote:
Originally Posted by norbusan
Do you prefer the external pflag or the golang internal flag library? Syntax-wise they seem to be rather close.
Adding some command line parsing I would switch to specifying the config yaml via an extra cmd line flag instead of a normal argument?
E.g.
Code:
kobopatch [--config SomeConfig.yaml] [--firmware PathToFirmware.zip]
WDYT?
|
I prefer pflag (spf13's fork), as it has better help, supports sort flags, and uses 2 dashes for long flags. Have a look at
this to see how I usually implement flags in my apps.
I'd keep the config as a positional argument so Windows users can drag and drop a config file.