first commit status: option and argument parsing, short aliases grouping, special values, hidden options
Option types: bool int, int-array, string, string-array, string-map, file, dir
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
package cli
|
||||
|
||||
func (cli *CliParser) SetOptionValue(name string, value string) (err error) {
|
||||
if opt := cli.findOptionByArg(name); opt != nil {
|
||||
_, err = opt.parse(cli, -1, &value)
|
||||
} else {
|
||||
err = errOptionNotFound(name)
|
||||
}
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user