rename flags’ ValueFromContext() to Get()

This commit is contained in:
Tilo Prütz
2022-04-25 07:59:10 +02:00
parent ca7f26ecb0
commit 835bd32714
16 changed files with 46 additions and 46 deletions

View File

@@ -164,8 +164,8 @@ func (f *TimestampFlag) Apply(set *flag.FlagSet) error {
return nil
}
// ValueFromContext returns the flags value in the given Context.
func (f *TimestampFlag) ValueFromContext(ctx *Context) *time.Time {
// Get returns the flags value in the given Context.
func (f *TimestampFlag) Get(ctx *Context) *time.Time {
return ctx.Timestamp(f.Name)
}