Merge branch 'main' into feature/1316-simplified_flag_value_access

This commit is contained in:
2022-04-26 08:12:17 -04:00
committed by GitHub
45 changed files with 1025 additions and 564 deletions

View File

@@ -170,8 +170,8 @@ func (f *TimestampFlag) Get(ctx *Context) *time.Time {
}
// Timestamp gets the timestamp from a flag name
func (c *Context) Timestamp(name string) *time.Time {
if fs := c.lookupFlagSet(name); fs != nil {
func (cCtx *Context) Timestamp(name string) *time.Time {
if fs := cCtx.lookupFlagSet(name); fs != nil {
return lookupTimestamp(name, fs)
}
return nil