IntVar defines an int flag with specified name, default value, and usage string. The argument p points to an int variable in which to store the value of the flag.
(p *int, name string, value int, usage string)
| 38 | // IntVar defines an int flag with specified name, default value, and usage string. |
| 39 | // The argument p points to an int variable in which to store the value of the flag. |
| 40 | func (f *FlagSet) IntVar(p *int, name string, value int, usage string) { |
| 41 | f.VarP(newIntValue(value, p), name, "", usage) |
| 42 | } |
| 43 | |
| 44 | // IntVarP is like IntVar, but accepts a shorthand letter that can be used after a single dash. |
| 45 | func (f *FlagSet) IntVarP(p *int, name, shorthand string, value int, usage string) { |
no test coverage detected