Revert "reset generated flags changes"

This reverts commit 9ec594d529.
This commit is contained in:
Lynn Cyrin
2019-07-28 22:45:43 -07:00
parent 9ec594d529
commit 386b379d19
2 changed files with 84 additions and 0 deletions

View File

@@ -143,6 +143,7 @@ def _write_cli_flag_types(outfile, types):
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
""".format(**typedef))
@@ -170,6 +171,11 @@ def _write_cli_flag_types(outfile, types):
return f.Name
}}
// IsRequired returns the whether or not the flag is required
func (f {name}Flag) IsRequired() bool {{
return f.Required
}}
// {name} looks up the value of a local {name}Flag, returns
// {context_default} if not found
func (c *Context) {name}(name string) {context_type} {{