@@ -22,14 +22,16 @@ GNU command line argument rules:
2222- options may appear in any order
2323- the argument ` -- ` terminates all options so that all following arguments are treated as non-options
2424- an argument value of ` - ` is allowed, usually used to mean standard in or out streams
25+ - options may be specified multiple times, only the last one determines its value
2526
2627Additional features:
2728
28- - options may be specified multiple times, only the last one determines its value
29- - counting options are supported: ` -vvv ` sets ` v = 3 `
29+ - counting options: ` -vvv ` sets ` v = 3 `
30+ - appending options: ` -v 1 -v 2 ` sets ` v = []int{1, 2} `
31+ - boolean options: ` --var ` enables and ` --no-var ` disables a boolean
3032- options can be composite types, such as structs, slices, or maps:
31- - ` -v 1,2,3 ` sets ` v = []int{1,2, 3} `
32- - ` -v [1 2 3] ` sets ` v = []int{1,2, 3} `
33+ - ` -v 1,2,3 ` sets ` v = []int{1, 2, 3} `
34+ - ` -v [1 2 3] ` sets ` v = []int{1, 2, 3} `
3335 - ` -v {1:one 2:two} ` sets ` map[int]string{1:"one", 2:"two"} `
3436 - ` -v {string 42 [0 1]} ` sets ` struct{S string, I int, B [2]bool}{"string", 42, false, true} `
3537- options can retrieve their list/dict values from a source (such as SQL):
0 commit comments