Merge pull request #245 from cpuguy83/get_parent_ctx

Add func to get context parent
This commit is contained in:
Jesse Szwedko 2015-06-20 11:34:02 -07:00
commit ad480243a8

View File

@ -180,6 +180,11 @@ func (c *Context) GlobalFlagNames() (names []string) {
return return
} }
// Returns the parent context, if any
func (c *Context) Parent() *Context {
return c.parentContext
}
type Args []string type Args []string
// Returns the command line arguments associated with the context. // Returns the command line arguments associated with the context.