rename flags’ ValueFromContext() to Get()
This commit is contained in:
@@ -97,8 +97,8 @@ func (f *StringFlag) Apply(set *flag.FlagSet) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ValueFromContext returns the flag’s value in the given Context.
|
||||
func (f *StringFlag) ValueFromContext(ctx *Context) string {
|
||||
// Get returns the flag’s value in the given Context.
|
||||
func (f *StringFlag) Get(ctx *Context) string {
|
||||
return ctx.String(f.Name)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user