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

Function AskName

pkg/question/input.go:49–63  ·  view source on GitHub ↗
(ask Asker, messagePrefix string, resourceDescription string, value *string)

Source from the content-addressed store, hash-verified

47}
48
49func AskName(ask Asker, messagePrefix string, resourceDescription string, value *string) error {
50 if *value == "" {
51 if err := ask(&survey.Input{
52 Message: messagePrefix + "Name",
53 Help: fmt.Sprintf("A short, memorable, unique name for this %s.", resourceDescription),
54 }, value, survey.WithValidator(survey.ComposeValidators(
55 survey.MaxLength(200),
56 survey.MinLength(1),
57 survey.Required,
58 ))); err != nil {
59 return err
60 }
61 }
62 return nil
63}
64
65func AskDescription(ask Asker, messagePrefix string, resourceDescription string, value *string) error {
66 if *value == "" {

Callers 13

PromptMissingFunction · 0.92
PromptMissingFunction · 0.92
PromptMissingFunction · 0.92
PromptMissingFunction · 0.92
PromptMissingFunction · 0.92
PromptMissingFunction · 0.92
PromptMissingFunction · 0.92
PromptMissingFunction · 0.92
PromptMissingFunction · 0.92
PromptMissingFunction · 0.92
PromptMissingFunction · 0.92
PromptMissingFunction · 0.92

Calls

no outgoing calls

Tested by 1

TestAskNameFunction · 0.74