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

Function PromptMissing

pkg/cmd/project/delete/delete.go:89–103  ·  view source on GitHub ↗
(opts *DeleteOptions)

Source from the content-addressed store, hash-verified

87}
88
89func PromptMissing(opts *DeleteOptions) error {
90 if opts.IdOrName == "" {
91 existingProjects, err := opts.Client.Projects.GetAll()
92 if err != nil {
93 return err
94 }
95 itemToDelete, err := selectors.ByName(opts.Ask, existingProjects, "Select the project you wish to delete:")
96 if err != nil {
97 return err
98 }
99 opts.IdOrName = itemToDelete.GetID()
100 }
101
102 return nil
103}
104
105func delete(client *client.Client, project *projects.Project) error {
106 return client.Projects.DeleteByID(project.GetID())

Callers 1

deleteRunFunction · 0.70

Calls 1

ByNameFunction · 0.92

Tested by

no test coverage detected