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

Function promptForVariable

pkg/cmd/project/variables/update/update.go:301–308  ·  view source on GitHub ↗
(opts *UpdateOptions, projectVariables *variables.VariableSet)

Source from the content-addressed store, hash-verified

299}
300
301func promptForVariable(opts *UpdateOptions, projectVariables *variables.VariableSet) (*variables.Variable, error) {
302 selectedOption, err := selectors.Select(opts.Ask, "Select the variable you wish to update", func() ([]*variables.Variable, error) { return projectVariables.Variables, nil }, func(v *variables.Variable) string { return formatVariableSelection(v) })
303
304 if err != nil {
305 return nil, err
306 }
307 return selectedOption, nil
308}
309
310func formatVariableSelection(v *variables.Variable) string {
311 value := v.Value

Callers 1

PromptMissingFunction · 0.70

Calls 2

SelectFunction · 0.92
formatVariableSelectionFunction · 0.85

Tested by

no test coverage detected