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

Function PromptMissing

pkg/cmd/projectgroup/delete/delete.go:78–92  ·  view source on GitHub ↗
(opts *DeleteOptions)

Source from the content-addressed store, hash-verified

76}
77
78func PromptMissing(opts *DeleteOptions) error {
79 if opts.IdOrName == "" {
80 existingProjects, err := opts.Client.ProjectGroups.GetAll()
81 if err != nil {
82 return err
83 }
84 itemToDelete, err := selectors.ByName(opts.Ask, existingProjects, "Select the project group you wish to delete:")
85 if err != nil {
86 return err
87 }
88 opts.IdOrName = itemToDelete.GetID()
89 }
90
91 return nil
92}
93
94func delete(client *client.Client, project *projectgroups.ProjectGroup) error {
95 return client.ProjectGroups.DeleteByID(project.GetID())

Callers 1

deleteRunFunction · 0.70

Calls 1

ByNameFunction · 0.92

Tested by

no test coverage detected