MCPcopy Create free account
hub / github.com/OctopusDeploy/cli / parseSelectOptions

Function parseSelectOptions

pkg/cmd/project/variables/create/create.go:417–432  ·  view source on GitHub ↗
(opts *CreateOptions, controlType resources.ControlType)

Source from the content-addressed store, hash-verified

415}
416
417func parseSelectOptions(opts *CreateOptions, controlType resources.ControlType) []*resources.SelectOption {
418 options := []*resources.SelectOption{}
419 if controlType != resources.ControlTypeSelect {
420 return options
421 }
422
423 for _, selectOption := range opts.PromptSelectOptions.Value {
424 o := strings.Split(selectOption, "|")
425 options = append(options, &resources.SelectOption{
426 Value: o[0],
427 DisplayName: o[1],
428 })
429 }
430
431 return options
432}
433
434func mapVariableType(varType string) (string, error) {
435 if varType == "" {

Callers 1

CreateRunFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected