refactor flag names - make it more explicitly
avoid the using 'reflect' package while getting flag names
This commit is contained in:
@@ -31,7 +31,7 @@ func (f *StringFlag) String() string {
|
||||
|
||||
// Names returns the names of the flag
|
||||
func (f *StringFlag) Names() []string {
|
||||
return flagNames(f)
|
||||
return flagNames(f.Name, f.Aliases)
|
||||
}
|
||||
|
||||
// IsRequired returns whether or not the flag is required
|
||||
|
Reference in New Issue
Block a user