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

Function findTeam

pkg/cmd/space/create/create.go:151–159  ·  view source on GitHub ↗
(allTeams []*teams.Team, identifier string)

Source from the content-addressed store, hash-verified

149}
150
151func findTeam(allTeams []*teams.Team, identifier string) (*teams.Team, error) {
152 for _, team := range allTeams {
153 if strings.EqualFold(identifier, team.ID) || strings.EqualFold(identifier, team.Name) {
154 return team, nil
155 }
156 }
157
158 return nil, errors.New(fmt.Sprintf("Cannot find team '%s'", identifier))
159}
160
161func findUser(allUsers []*users.User, identifier string) (*users.User, error) {
162 for _, user := range allUsers {

Callers 1

createRunFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected