MCPcopy Create free account
hub / github.com/cloudfoundry/multiapps-cli-plugin / Parse

Method Parse

commands/flags_parser.go:26–36  ·  view source on GitHub ↗

Parse parsing the args

(args []string)

Source from the content-addressed store, hash-verified

24
25// Parse parsing the args
26func (p *CommandFlagsParser) Parse(args []string) error {
27 err := p.parser.ParseFlags(p.flag, args)
28 if err != nil {
29 return err
30 }
31
32 // assume that the parsing of arguments is successful - determine the arguments which are not flagged
33 p.parsedArgs = determineParsedNotFlaggedArguments(p.flag, args)
34
35 return p.validator.ValidateParsedFlags(p.flag)
36}
37
38func determineParsedNotFlaggedArguments(flag *flag.FlagSet, args []string) []string {
39 result := make([]string, 0)

Callers 1

ExecuteMethod · 0.95

Calls 3

ParseFlagsMethod · 0.65
ValidateParsedFlagsMethod · 0.65

Tested by

no test coverage detected