Merge pull request #1258 from dearchap/visible_interface

Fix(issue #631). Remove reflect calls for Hidden field
This commit is contained in:
Robert Liebowitz
2021-04-24 13:10:52 -04:00
committed by GitHub
16 changed files with 84 additions and 2 deletions

View File

@@ -114,6 +114,11 @@ func (f *TimestampFlag) GetValue() string {
return ""
}
// IsVisible returns true if the flag is not hidden, otherwise false
func (f *TimestampFlag) IsVisible() bool {
return !f.Hidden
}
// Apply populates the flag given the flag set and environment
func (f *TimestampFlag) Apply(set *flag.FlagSet) error {
if f.Layout == "" {