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

Function Parse

flag.go:1238–1241  ·  flag.go::Parse

Parse parses the command-line flags from os.Args[1:]. Must be called after all flags are defined and before flags are accessed by the program.

()

Source from the content-addressed store, hash-verified

1236// Parse parses the command-line flags from os.Args[1:]. Must be called
1237// after all flags are defined and before flags are accessed by the program.
1238func Parse() {
1239 // Ignore errors; CommandLine is set for ExitOnError.
1240 CommandLine.Parse(os.Args[1:])
1241}
1242
1243// ParseAll parses the command-line flags from os.Args[1:] and called fn for each.
1244// The arguments for fn are flag and value. Must be called after all flags are

Callers 1

TestChangingArgsFunction · 0.85

Calls 1

ParseMethod · 0.65

Tested by 1

TestChangingArgsFunction · 0.68