docopt.go
docopt.go copied to clipboard
Array values duplicated with OneOrMore options (...)
The following usage
Usage:
%[1]s [-u <URL>...] (-D <DOMAINFILE> [-V <VOLUMEFILE> -p <STORAGEPOOL> --start])
%[1]s [-u <URL>...] (-V <VOLUMEFILE> [-p <STORAGEPOOL>])
%[1]s [-u <URL>...] (--domdata <DOMAINDATA> [--voldata <VOLUMEDATA> -p <STORAGEPOOL>] --start)
%[1]s [-u <URL>...] (--voldata <VOLUMEDATA> [-p <STORAGEPOOL>])
%[1]s [-u <URL>...] (-R <DOMAINNAME>)
Options:
-u, --url <URL> server url [default: qemu:///system]
*******
with cli opts -u qemu+ssh://user@hostname/system -u test
produces array with duplicated 2-nd value: [qemu+ssh://user@hostname/system test test test test test]
Hello, very interesting. Could you explain what introduced the duplication? I suppose it's related to multiple line of usage linked with the options definition.
Very nice catch. I also tested on line
Bug here too.