// Del deletes comment.
547105
func (comments *Comments) Del(comment *Comment) error {
	insta := comments.item.media.instagram()

	data, err := insta.prepareData()
	if err != nil {
		return err
	}
	id := comment.getid()

	_, err = insta.sendRequest(
		&reqOptions{
			Endpoint: fmt.Sprintf(urlCommentDelete, comments.item.ID, id),
			Query:    generateSignature(data),
			IsPost:   true,
		},
	)
	return err
}
145741
func (h *HashMap) Del(elementid string) error {
	if h.name == nil {
		return ErrDoesNotExist
	}
	// Remove the keys starting with elementid + ":"
	return (*bbolt.DB)(h.db).Update(func(tx *bbolt.Tx) error {
		bucket := tx.Bucket(h.name)
		if bucket == nil {
			return ErrBucketNotFound
		}
		return bucket.ForEach(func(byteKey, byteValue []byte) error {
			combinedKey := string(byteKey)
			if strings.Contains(combinedKey, ":") {
				fields := strings.SplitN(combinedKey, ":", 2)
				if fields[0] == elementid {
					return bucket.Delete([]byte(combinedKey))
				}
			}
			return nil // Continue ForEach
		})
	})
}
1160376
func (c *CommentsController) Delete(ctx *app.DeleteCommentsContext) error {
	identityID, err := login.ContextIdentity(ctx)
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, goa.ErrUnauthorized(err.Error()))
	}
	cm, wi, userIsCreator, err := c.loadComment(ctx.Context, ctx.CommentID, *identityID)
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, err)
	}
	// User is allowed to delete if user is creator of the comment OR user is a space collaborator
	if !userIsCreator {
		authorized, err := authz.Authorize(ctx, wi.SpaceID.String())
		if err != nil {
			return jsonapi.JSONErrorResponse(ctx, errors.NewUnauthorizedError(err.Error()))
		}
		if !authorized {
			return jsonapi.JSONErrorResponse(ctx, errors.NewForbiddenError("user is not a space collaborator"))
		}
	}
	err = application.Transactional(c.db, func(appl application.Application) error {
		return appl.Comments().Delete(ctx.Context, cm.ID, *identityID)
	})
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, err)
	}
	return ctx.OK([]byte{})
}
1238072
func (hm *HashMap) Del(key Hashable) {
	delete((*hm).keys, key.Hash())
	delete((*hm).values, key.Hash())
}
728390
func (m MultiLevel) Del(path string) {
	for _, level := range m {
		level.Del(path)
	}
}
1017962
func Del(setname, address string, args ...string) error {
	return exec(C.IPSET_CMD_DEL, setname, address, args...)
}
819
func (ini *INI) Del(section, key string) bool {
	// Remove the section.
	if key == "" {
		if section == "" {
			ini.global = iniSection{}
			return true
		}

		return ini.rmSection(section)
	}

	// Remove the key for the section.
	return ini.getSection(section).rmItem(key, ini.isCaseSensitive)
}
122250
func (m *Encoders) Del(e respond.Encoder) {
	m.lock.Lock()
	defer m.lock.Unlock()
	found := false
	for k, v := range m.encoders {
		if v == e {
			delete(m.encoders, k)
			found = true
		}
	}
	if !found {
		panic("respond: encoder not found")
	}
}
603398
func (c Claims) Del(key string) {
	jwt.Claims(c).Del(key)
}
1205939
func (s Set) Del(value string) bool {
	if _, ok := s[value]; !ok {
		return false
	}
	delete(s, value)
	return true
}
316299
func (m *Miniredis) Del(k string) bool {
	return m.DB(m.selectedDB).Del(k)
}
440420
func (c *Cursor) Del(flags uint) error {
	ret := C.mdb_cursor_del(c._c, C.uint(flags))
	return operrno("mdb_cursor_del", ret)
}
1313348
func (s *SyncedSet) Del(datas ...interface{}) {
	s.Lock()
	defer s.Unlock()
	for _, data := range datas {
		delete(s.set, data)
	}
}
552715
func (s *IPSet) Del(entry string) error {
	out, err := exec.Command(ipsetPath, "del", s.Name, entry, "-exist").CombinedOutput()
	if err != nil {
		return fmt.Errorf("error deleting entry %s: %v (%s)", entry, err, out)
	}
	return nil
}
87173
func (ll *ListLogHandler) Del(h LogHandler) {
	if h != nil {
		for i, handler := range ll.handlers {
			if handler == h {
				ll.handlers = append(ll.handlers[:i], ll.handlers[i+1:]...)
			}
		}
	}
}
550809
func (h Headers) Del(k string) {
	delete(h.items, CanonicalizeHeaderKey(k))
	delete(h.originalItems, k)
}
1249965
func (k *kq) Del(w *watched) {
	syscall.Close(w.fd)
	delete(k.idLkp, w.fd)
	delete(k.pthLkp, w.p)
}