BoolFuncP is like BoolFunc, but accepts a shorthand letter that can be used after a single dash.
(name, shorthand string, usage string, fn func(string) error)
| 21 | |
| 22 | // BoolFuncP is like BoolFunc, but accepts a shorthand letter that can be used after a single dash. |
| 23 | func (f *FlagSet) BoolFuncP(name, shorthand string, usage string, fn func(string) error) { |
| 24 | var val Value = boolfuncValue(fn) |
| 25 | flag := f.VarPF(val, name, shorthand, usage) |
| 26 | flag.NoOptDefVal = "true" |
| 27 | } |
| 28 | |
| 29 | // BoolFunc defines a func flag with specified name, callback function and usage string. |
| 30 | // |