(args []string)
| 786 | } |
| 787 | |
| 788 | func (b CommandBuilder) Create(args []string) ([]*CommandDefinition, error) { |
| 789 | serviceVersion := b.parseArgument(args, FlagNameServiceVersion) |
| 790 | profile := b.parseArgument(args, FlagNameProfile) |
| 791 | if serviceVersion == "" && profile != "" { |
| 792 | serviceVersion = b.serviceVersionFromProfile(profile) |
| 793 | } |
| 794 | definitions, err := b.loadDefinitions(args, serviceVersion) |
| 795 | if err != nil { |
| 796 | return nil, err |
| 797 | } |
| 798 | servicesCommands := b.createServiceCommands(definitions) |
| 799 | autocompleteCommand := b.createAutoCompleteCommand(serviceVersion) |
| 800 | configCommand := b.createConfigCommand() |
| 801 | inspectCommand := b.createInspectCommand(definitions) |
| 802 | commands := append(servicesCommands, autocompleteCommand, configCommand, inspectCommand) |
| 803 | return commands, nil |
| 804 | } |
no test coverage detected