reduce diff

This commit is contained in:
Lynn Cyrin 2019-12-24 08:56:36 -08:00
parent 9eb7426ac3
commit 5d74b7723a
No known key found for this signature in database
GPG Key ID: 9E60BEE0555C367B

View File

@ -24,11 +24,7 @@ type Context struct {
// NewContext creates a new context. For use in when invoking an App or Command action. // NewContext creates a new context. For use in when invoking an App or Command action.
func NewContext(app *App, set *flag.FlagSet, parentCtx *Context) *Context { func NewContext(app *App, set *flag.FlagSet, parentCtx *Context) *Context {
c := &Context{ c := &Context{App: app, flagSet: set, parentContext: parentCtx}
App: app,
flagSet: set,
parentContext: parentCtx,
}
if parentCtx != nil { if parentCtx != nil {
c.Context = parentCtx.Context c.Context = parentCtx.Context