MCPcopy
hub / github.com/spf13/pflag / ArgsLenAtDash

Method ArgsLenAtDash

flag.go:427–429  ·  view source on GitHub ↗

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.

()

Source from the content-addressed store, hash-verified

425// found during arg parsing. This allows your program to know which args were
426// before the -- and which came after.
427func (f *FlagSet) ArgsLenAtDash() int {
428 return f.argsLenAtDash
429}
430
431// MarkDeprecated indicated that a flag is deprecated in your program. It will
432// continue to function but will not show up in help or usage messages. Using

Callers 3

TestShorthandFunction · 0.95
TestChangedHelperFunction · 0.95
TestTerminationFunction · 0.95

Calls

no outgoing calls

Tested by 3

TestShorthandFunction · 0.76
TestChangedHelperFunction · 0.76
TestTerminationFunction · 0.76