Count defines a count flag with specified name, default value, and usage string. The return value is the address of an int variable that stores the value of the flag. A count flag will add 1 to its value every time it is found on the command line
(name string, usage string)
| 71 | // The return value is the address of an int variable that stores the value of the flag. |
| 72 | // A count flag will add 1 to its value every time it is found on the command line |
| 73 | func (f *FlagSet) Count(name string, usage string) *int { |
| 74 | p := new(int) |
| 75 | f.CountVarP(p, name, "", usage) |
| 76 | return p |
| 77 | } |
| 78 | |
| 79 | // CountP is like Count only takes a shorthand for the flag name. |
| 80 | func (f *FlagSet) CountP(name, shorthand string, usage string) *int { |