Add in Category to Flag interface

This commit is contained in:
Michael Schuett
2019-01-27 11:41:54 -05:00
parent 7c383b0d16
commit 9dd96e9e90
5 changed files with 88 additions and 1 deletions

View File

@@ -176,6 +176,11 @@ def _write_cli_flag_types(outfile, types):
return f.Hidden
}}
// GetCategory lets us access the flag category
func (f {name}Flag) GetCategory() string {{
return f.Category
}}
// {name} looks up the value of a local {name}Flag, returns
// {context_default} if not found
func (c *Context) {name}(name string) {context_type} {{