BoolP is like Bool, but accepts a shorthand letter that can be used after a single dash.
(name, shorthand string, value bool, usage string)
| 76 | |
| 77 | // BoolP is like Bool, but accepts a shorthand letter that can be used after a single dash. |
| 78 | func (f *FlagSet) BoolP(name, shorthand string, value bool, usage string) *bool { |
| 79 | p := new(bool) |
| 80 | f.BoolVarP(p, name, shorthand, value, usage) |
| 81 | return p |
| 82 | } |
| 83 | |
| 84 | // Bool defines a bool flag with specified name, default value, and usage string. |
| 85 | // The return value is the address of a bool variable that stores the value of the flag. |