diff options
| author | Albert Nigmatzianov <[email protected]> | 2017-04-18 17:43:21 +0200 |
|---|---|---|
| committer | Albert Nigmatzianov <[email protected]> | 2017-04-26 21:20:41 +0200 |
| commit | 159e1d735932e06dea06984c46ecd275decb7506 (patch) | |
| tree | 63ae2e600177f4fdaa882776385e25c1a13e3006 /count.go | |
| parent | e466d44e2fb353cced5fb64e5897333e42cdb2ef (diff) | |
Document Count function
Diffstat (limited to 'count.go')
| -rw-r--r-- | count.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -83,7 +83,9 @@ func (f *FlagSet) CountP(name, shorthand string, usage string) *int { return p } -// Count like Count only the flag is placed on the CommandLine isntead of a given flag set +// 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 evey time it is found on the command line func Count(name string, usage string) *int { return CommandLine.CountP(name, "", usage) } |
