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

Function selectUsers

pkg/cmd/space/create/create.go:190–199  ·  view source on GitHub ↗
(ask question.Asker, getAllUsersCallback shared.GetAllUsersCallback, message string)

Source from the content-addressed store, hash-verified

188}
189
190func selectUsers(ask question.Asker, getAllUsersCallback shared.GetAllUsersCallback, message string) ([]*users.User, error) {
191 existingUsers, err := getAllUsersCallback()
192 if err != nil {
193 return nil, err
194 }
195
196 return question.MultiSelectMap(ask, message, existingUsers, func(existingUser *users.User) string {
197 return fmt.Sprintf("%s %s", existingUser.DisplayName, output.Dimf("(%s)", existingUser.Username))
198 }, false)
199}
200
201func PromptMissing(opts *CreateOptions) error {
202 existingSpaces, err := opts.GetAllSpacesCallback()

Callers 1

PromptMissingFunction · 0.85

Calls 2

MultiSelectMapFunction · 0.92
DimfFunction · 0.92

Tested by

no test coverage detected