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

Function ParseAll

flag.go:1246–1249  ·  view source on GitHub ↗

ParseAll parses the command-line flags from os.Args[1:] and called fn for each. The arguments for fn are flag and value. Must be called after all flags are defined and before flags are accessed by the program.

(fn func(flag *Flag, value string) error)

Source from the content-addressed store, hash-verified

1244// The arguments for fn are flag and value. Must be called after all flags are
1245// defined and before flags are accessed by the program.
1246func ParseAll(fn func(flag *Flag, value string) error) {
1247 // Ignore errors; CommandLine is set for ExitOnError.
1248 CommandLine.ParseAll(os.Args[1:], fn)
1249}
1250
1251// SetInterspersed sets whether to support interspersed option/non-option arguments.
1252func SetInterspersed(interspersed bool) {

Callers

nothing calls this directly

Calls 1

ParseAllMethod · 0.80

Tested by

no test coverage detected