(parameters []parser.Parameter)
| 120 | } |
| 121 | |
| 122 | func (b CommandBuilder) sortParameters(parameters []parser.Parameter) { |
| 123 | sort.Slice(parameters, func(i, j int) bool { |
| 124 | if parameters[i].Required && !parameters[j].Required { |
| 125 | return true |
| 126 | } |
| 127 | if !parameters[i].Required && parameters[j].Required { |
| 128 | return false |
| 129 | } |
| 130 | return parameters[i].Name < parameters[j].Name |
| 131 | }) |
| 132 | } |
| 133 | |
| 134 | func (b CommandBuilder) outputFormat(config config.Config, context *CommandExecContext) (string, error) { |
| 135 | outputFormat := context.String(FlagNameOutputFormat) |
no outgoing calls
no test coverage detected