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

Function mapControlType

pkg/cmd/project/variables/create/create.go:459–472  ·  view source on GitHub ↗
(promptType string)

Source from the content-addressed store, hash-verified

457}
458
459func mapControlType(promptType string) (resources.ControlType, error) {
460 switch promptType {
461 case PromptTypeText:
462 return resources.ControlTypeSingleLineText, nil
463 case PromptTypeMultiText:
464 return resources.ControlTypeMultiLineText, nil
465 case PromptTypeCheckbox:
466 return resources.ControlTypeCheckbox, nil
467 case PromptTypeDropdown:
468 return resources.ControlTypeSelect, nil
469 default:
470 return "", fmt.Errorf("unknown prompt type '%s', valid values are '%s','%s','%s', '%s'", promptType, PromptTypeText, PromptTypeMultiText, PromptTypeCheckbox, PromptTypeDropdown)
471 }
472}

Callers 1

CreateRunFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected