MCPcopy Index your code
hub / github.com/coder/coder / DeleteGroup

Method DeleteGroup

codersdk/groups.go:215–229  ·  view source on GitHub ↗
(ctx context.Context, group uuid.UUID)

Source from the content-addressed store, hash-verified

213}
214
215func (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}

Callers 3

TestDeleteGroupFunction · 0.80
TestTemplateACLFunction · 0.80
groupDeleteMethod · 0.80

Calls 5

RequestMethod · 0.95
ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65
StringMethod · 0.45
ErrorfMethod · 0.45

Tested by 2

TestDeleteGroupFunction · 0.64
TestTemplateACLFunction · 0.64