mirror of
https://github.com/spf13/cobra
synced 2024-11-24 14:47:12 +00:00
Added documentation for ArgsLenAtDash
This commit is contained in:
parent
d732ab3a34
commit
c4d6dbe059
1 changed files with 4 additions and 0 deletions
|
@ -483,6 +483,10 @@ func (c *Command) Root() *Command {
|
|||
return findRoot(c)
|
||||
}
|
||||
|
||||
// ArgsLenAtDash will return the length of f.Args at the moment when a -- was
|
||||
// found during arg parsing. This allows your program to know which args were
|
||||
// before the -- and which came after. (Description from
|
||||
// https://godoc.org/github.com/spf13/pflag#FlagSet.ArgsLenAtDash).
|
||||
func (c *Command) ArgsLenAtDash() int {
|
||||
return c.Flags().ArgsLenAtDash()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue