Merge pull request #167 from siddharthist/docs/ArgsLenAtDash

Added documentation for ArgsLenAtDash
This commit is contained in:
Eric Paris 2015-10-13 17:51:39 -05:00
commit 8b2293c741

View file

@ -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()
}