Add func to get context parent
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
parent
7ad88c2740
commit
15e6b2fcc7
@ -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.
|
||||||
|
Loading…
Reference in New Issue
Block a user