(ctx context.Context, name string)
| 34 | } |
| 35 | |
| 36 | func (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 | |
| 45 | func (*Client) FindTeam(teams []Team, name string) (*Team, error) { |
| 46 | for _, t := range teams { |
no test coverage detected