(ctx context.Context, group uuid.UUID)
| 213 | } |
| 214 | |
| 215 | func (c *Client) DeleteGroup(ctx context.Context, group uuid.UUID) error { |
| 216 | res, err := c.Request(ctx, http.MethodDelete, |
| 217 | fmt.Sprintf("/api/v2/groups/%s", group.String()), |
| 218 | nil, |
| 219 | ) |
| 220 | if err != nil { |
| 221 | return xerrors.Errorf("make request: %w", err) |
| 222 | } |
| 223 | defer res.Body.Close() |
| 224 | |
| 225 | if res.StatusCode != http.StatusOK { |
| 226 | return ReadBodyAsError(res) |
| 227 | } |
| 228 | return nil |
| 229 | } |