Root finds root command.
()
| 890 | |
| 891 | // Root finds root command. |
| 892 | func (c *Command) Root() *Command { |
| 893 | if c.HasParent() { |
| 894 | return c.Parent().Root() |
| 895 | } |
| 896 | return c |
| 897 | } |
| 898 | |
| 899 | // ArgsLenAtDash will return the length of c.Flags().Args at the moment |
| 900 | // when a -- was found during args parsing. |
no test coverage detected