Add context.Count

This commit is contained in:
Naveen Gogineni
2022-09-05 17:35:30 -04:00
committed by Dan Buch
parent fa3bbf91ed
commit c0a8506cea
4 changed files with 53 additions and 9 deletions

View File

@@ -621,6 +621,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