// Delete deletes a user.
977748
func Delete(c *client.Client, username string) error {
	var body []byte
	var err error

	if username != "" {
		req := api.AuthCancelRequest{Username: username}
		body, err = json.Marshal(req)

		if err != nil {
			return err
		}
	}

	_, err = c.BasicRequest("DELETE", "/v1/auth/cancel/", body)
	return err
}
449036
func Delete(name string) {
	configsGuard.Lock()
	defer configsGuard.Unlock()
	delete(configs, name)
}
1169231
func (s *SessionStatsCollector) Delete() {
	s.Lock()
	defer s.Unlock()
	s.deleted = true
}
603649
func (crs *ConfigRepoService) Delete(ctx context.Context, id string) (string, *APIResponse, error) {
	return crs.client.deleteAction(ctx, fmt.Sprintf("admin/config_repos/%s", id), apiV1)
}
1131094
func (c *FakeGroups) Delete(name string, options *v1.DeleteOptions) error {
	_, err := c.Fake.
		Invokes(testing.NewRootDeleteAction(groupsResource, name), &user.Group{})
	return err
}
536495
func Delete(url string, v ...interface{}) (*Resp, error) {
	return std.Delete(url, v...)
}
1089184
func (s LoginSession) Delete(d Deleter) error {
	req := &request{
		url: "https://www.reddit.com/api/del",
		values: &url.Values{
			"id": {d.deleteID()},
			"uh": {s.modhash},
		},
		cookie:    s.cookie,
		useragent: s.useragent,
	}

	body, err := req.getResponse()
	if err != nil {
		return err
	}

	if !strings.Contains(body.String(), "data") {
		return errors.New("failed to delete item")
	}

	return nil
}
1350119
func (k macOSXKeychain) Delete(service, username string) error {
	out, err := exec.Command(
		execPathKeychain,
		"delete-generic-password",
		"-s", service,
		"-a", username).CombinedOutput()
	if strings.Contains(fmt.Sprintf("%s", out), "could not be found") {
		err = ErrNotFound
	}
	return err
}
1081480
func (f *FakeDeleter) Delete(name string) error {
	f.NsDeleted = append(f.NsDeleted, name)
	return f.Err
}
801041
func (c *Client) DeleteUser(p *DeleteUserParameter) (*Result, error) {
	obj, err := c.Request("deleteUser", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.(*Result), err
}
1193646
func (c *FakeOAuthClients) Delete(name string, options *v1.DeleteOptions) error {
	_, err := c.Fake.
		Invokes(testing.NewRootDeleteAction(oauthclientsResource, name), &oauth.OAuthClient{})
	return err
}
642329
func (aug *AuthUserGroup) Delete(db XODB) error {
	var err error

	// if doesn't exist, bail
	if !aug._exists {
		return nil
	}

	// if deleted, bail
	if aug._deleted {
		return nil
	}

	// sql query
	const sqlstr = `DELETE FROM django.auth_user_groups WHERE id = :1`

	// run query
	XOLog(sqlstr, aug.ID)
	_, err = db.Exec(sqlstr, aug.ID)
	if err != nil {
		return err
	}

	// set deleted
	aug._deleted = true

	return nil
}
877147
func (s *REST) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) (runtime.Object, bool, error) {
	return &metav1.Status{Status: metav1.StatusSuccess}, false, s.client.Delete(name, nil)
}
429486
func (s *service) Delete(ctx context.Context, r *taskAPI.DeleteRequest) (*taskAPI.DeleteResponse, error) {
	return nil, errdefs.ErrNotImplemented
}
1122409
func (m *SessionManager) Delete(key string) error {
	stmt := Sessions.Delete().Where(Sessions.C("key").Equals(key))
	return m.conn.Query(stmt)
}
1012648
func (r *Request) Delete(url string) (*Response, error) {
	return r.Execute(MethodDelete, url)
}
581982
func (r *Redis) Delete(key string) error {
	return r.Client.Del(key).Err()
}