(questionText string, octopus *octopusApiClient.Client, ask question.Asker)
| 7 | ) |
| 8 | |
| 9 | func Project(questionText string, octopus *octopusApiClient.Client, ask question.Asker) (*projects.Project, error) { |
| 10 | existingProjects, err := octopus.Projects.GetAll() |
| 11 | if err != nil { |
| 12 | return nil, err |
| 13 | } |
| 14 | |
| 15 | return question.SelectMap(ask, questionText, existingProjects, func(p *projects.Project) string { |
| 16 | return p.Name |
| 17 | }) |
| 18 | } |
| 19 | |
| 20 | func FindProject(octopus *octopusApiClient.Client, projectIdentifier string) (*projects.Project, error) { |
| 21 | project, err := octopus.Projects.GetByIdentifier(projectIdentifier) |
no test coverage detected