MCPcopy Create free account
hub / github.com/UiPath/uipathcli / sortParameters

Method sortParameters

commandline/command_builder.go:122–132  ·  view source on GitHub ↗
(parameters []parser.Parameter)

Source from the content-addressed store, hash-verified

120}
121
122func (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
134func (b CommandBuilder) outputFormat(config config.Config, context *CommandExecContext) (string, error) {
135 outputFormat := context.String(FlagNameOutputFormat)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected