Merge pull request #1264 from dearchap/cleanup_context

Cleanup context.go
This commit is contained in:
Robert Liebowitz
2021-04-24 12:02:16 -04:00
committed by GitHub
21 changed files with 118 additions and 121 deletions

View File

@@ -148,7 +148,7 @@ func (f *TimestampFlag) Apply(set *flag.FlagSet) error {
// Timestamp gets the timestamp from a flag name
func (c *Context) Timestamp(name string) *time.Time {
if fs := lookupFlagSet(name, c); fs != nil {
if fs := c.lookupFlagSet(name); fs != nil {
return lookupTimestamp(name, fs)
}
return nil