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

@@ -97,8 +97,8 @@ func (f *StringFlag) Apply(set *flag.FlagSet) error {
return nil
}
// ValueFromContext returns the flags value in the given Context.
func (f *StringFlag) ValueFromContext(ctx *Context) string {
// Get returns the flags value in the given Context.
func (f *StringFlag) Get(ctx *Context) string {
return ctx.String(f.Name)
}