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

Function findUser

pkg/cmd/space/create/create.go:161–169  ·  view source on GitHub ↗
(allUsers []*users.User, identifier string)

Source from the content-addressed store, hash-verified

159}
160
161func findUser(allUsers []*users.User, identifier string) (*users.User, error) {
162 for _, user := range allUsers {
163 if strings.EqualFold(identifier, user.ID) || strings.EqualFold(identifier, user.Username) || strings.EqualFold(identifier, user.DisplayName) {
164 return user, nil
165 }
166 }
167
168 return nil, errors.New(fmt.Sprintf("Cannot find user '%s'", identifier))
169}
170
171func selectTeams(ask question.Asker, getAllTeamsCallback shared.GetAllTeamsCallback, existingSpaces []*spaces.Space, message string) ([]*teams.Team, error) {
172 systemTeams, err := getAllTeamsCallback()

Callers 1

createRunFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected