From c4d6dbe059bf035f560c3b3d18a81cc3a0b7bd04 Mon Sep 17 00:00:00 2001 From: siddharthist Date: Tue, 13 Oct 2015 15:37:14 -0700 Subject: [PATCH] Added documentation for ArgsLenAtDash --- command.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/command.go b/command.go index 0b85345..2041243 100644 --- a/command.go +++ b/command.go @@ -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() }