Add context.Count

This commit is contained in:
Naveen Gogineni
2022-09-05 17:35:30 -04:00
parent 5db4e8086e
commit 7941e8ccf6
4 changed files with 53 additions and 9 deletions

View File

@@ -633,6 +633,9 @@ func (cCtx *Context) Args() Args
func (cCtx *Context) Bool(name string) bool
Bool looks up the value of a local BoolFlag, returns false if not found
func (cCtx *Context) Count(name string) int
NumOccurrences returns the num of occurences of this flag
func (cCtx *Context) Duration(name string) time.Duration
Duration looks up the value of a local DurationFlag, returns 0 if not found