MCPcopy Index your code
hub / github.com/cloudquery/cloudquery / ValidateTeam

Method ValidateTeam

cli/internal/team/team.go:36–43  ·  view source on GitHub ↗
(ctx context.Context, name string)

Source from the content-addressed store, hash-verified

34}
35
36func (c *Client) ValidateTeam(ctx context.Context, name string) error {
37 teams, err := c.ListAllTeams(ctx)
38 if err != nil {
39 return fmt.Errorf("failed to list teams: %w", err)
40 }
41 _, err = c.FindTeam(teams, name)
42 return err
43}
44
45func (*Client) FindTeam(teams []Team, name string) (*Team, error) {
46 for _, t := range teams {

Callers 1

runSwitchFunction · 0.95

Calls 3

ListAllTeamsMethod · 0.95
FindTeamMethod · 0.95
ErrorfMethod · 0.80

Tested by

no test coverage detected