|
In general, command-line argument parsers should just follow the GNU style. No more, no less. Deviations confuse users as it is not immediately obvious to them what rules a parser is imposing. > options can have multiple values: -a 1 2 3 means that a is an array/slice/struct of three numbers of value [1,2,3] Allowing multiple values is inconsistent because you can't tell in "./cmd -a 1 2 3" whether 2 and 3 are positional arguments or arguments for -a. This is not a GNU style. The GNU way is "./cmd -a 1 -a 2 -a 3" (or "./cmd -a 1,2,3"). This package supports that, which is good. > option values can be separated by a space, equal sign, or nothing: -a1 -a=1 -a 1 are all equal "--a=1" is a GNU style but "-a=1" is not. This is a minor issue, though. Also, does this package support "--"? Everything following "--" should be treated as positional arguments. |