Provide the length of Args when a -- is found in commandline
This allows a program to know what args came before the -- and what args came after.
This commit is contained in:
@ -470,6 +470,10 @@ func (c *Command) Root() *Command {
|
||||
return findRoot(c)
|
||||
}
|
||||
|
||||
func (c *Command) ArgsLenAtDash() int {
|
||||
return c.Flags().ArgsLenAtDash()
|
||||
}
|
||||
|
||||
func (c *Command) execute(a []string) (err error) {
|
||||
if c == nil {
|
||||
return fmt.Errorf("Called Execute() on a nil Command")
|
||||
|
Reference in New Issue
Block a user