// remove deletes a header out of the header config and updates the barrier view
772126
func (a *AuditedHeadersConfig) remove(ctx context.Context, header string) error {
	if header == "" {
		return fmt.Errorf("header value cannot be empty")
	}

	// Grab a write lock
	a.Lock()
	defer a.Unlock()

	// Nothing to delete
	if len(a.Headers) == 0 {
		return nil
	}

	delete(a.Headers, strings.ToLower(header))
	entry, err := logical.StorageEntryJSON(auditedHeadersEntry, a.Headers)
	if err != nil {
		return errwrap.Wrapf("failed to persist audited headers config: {{err}}", err)
	}

	if err := a.view.Put(ctx, entry); err != nil {
		return errwrap.Wrapf("failed to persist audited headers config: {{err}}", err)
	}

	return nil
}
631923
func (b *FugaJSONBuilder) Remove(info *FugaPropertyInfo) *FugaJSONBuilder {
	delete(b._properties, info.fieldName)
	return b
}
345504
func (l *udpPacketList) Remove(e *udpPacket) {
	prev := udpPacketElementMapper{}.linkerFor(e).Prev()
	next := udpPacketElementMapper{}.linkerFor(e).Next()

	if prev != nil {
		udpPacketElementMapper{}.linkerFor(prev).SetNext(next)
	} else {
		l.head = next
	}

	if next != nil {
		udpPacketElementMapper{}.linkerFor(next).SetPrev(prev)
	} else {
		l.tail = prev
	}
}
1278808
func (t *tsmWriter) Remove() error {
	if err := t.index.Remove(); err != nil {
		return err
	}

	// nameCloser is the most permissive interface we can close the wrapped
	// value with.
	type nameCloser interface {
		io.Closer
		Name() string
	}

	if f, ok := t.wrapped.(nameCloser); ok {
		// Close the file handle to prevent leaking.  We ignore the error because
		// we just want to cleanup and remove the file.
		_ = f.Close()

		if err := os.Remove(f.Name()); err != nil {
			return err
		} else if err := os.Remove(StatsFilename(f.Name())); err != nil && !os.IsNotExist(err) {
			return err
		}
	}
	return nil
}
1322107
func (z *zones) Remove(zone dnsprovider.Zone) error {
	return deleteDomain(z.client, zone.Name())
}
629766
func (c *Client) Remove(name string) error {
	return delete(c, name, false)
}
287296
func (p *Project) Remove(c *check.C, containerID string) {
	c.Assert(p.project.Remove(containerID), check.IsNil,
		check.Commentf("error while removing the container %s", containerID))
}
1226146
func (c *ARC) Remove(key interface{}) bool {
	c.mu.Lock()
	defer c.mu.Unlock()

	return c.remove(key)
}
1089363
func (l *icmpPacketList) Remove(e *icmpPacket) {
	prev := icmpPacketElementMapper{}.linkerFor(e).Prev()
	next := icmpPacketElementMapper{}.linkerFor(e).Next()

	if prev != nil {
		icmpPacketElementMapper{}.linkerFor(prev).SetNext(next)
	} else {
		l.head = next
	}

	if next != nil {
		icmpPacketElementMapper{}.linkerFor(next).SetPrev(prev)
	} else {
		l.tail = prev
	}
}
162935
func (c *changer) Remove() error {
	if c.err != nil {
		return c.err
	}
	return c.node.remove()
}
1132790
func (l *PacketIntervalList) remove(e *PacketIntervalElement) *PacketIntervalElement {
	e.prev.next = e.next
	e.next.prev = e.prev
	e.next = nil // avoid memory leaks
	e.prev = nil // avoid memory leaks
	e.list = nil
	l.len--
	return e
}
823342
func (s *Service) Remove() error {
	installed, err := s.Installed()
	if err != nil {
		return errors.Trace(err)
	}
	if !installed {
		return nil
	}
	return os.Remove(s.confPath())
}
68482
func Remove(sess Session, w http.ResponseWriter) {
	Global.Remove(sess, w)
}
590777
func (d *Dtrie) Remove(key interface{}) *Dtrie {
	root := remove(d.root, d.hasher(key), key)
	return &Dtrie{root, d.hasher}
}
615543
func (c *UIConfig) DeleteHeader(ctx context.Context, header string) error {
	c.l.Lock()
	defer c.l.Unlock()

	config, err := c.get(ctx)
	if err != nil {
		return err
	}
	if config == nil {
		return nil
	}

	config.Headers.Del(header)
	return c.save(ctx, config)
}
1232720
func remove(this []dns.RR, that []dns.RR) []dns.RR {
	var result []dns.RR
	for _, thatRr := range that {
		isUnknown := true
		for _, thisRr := range this {
			switch a := thisRr.(type) {
			case *dns.PTR:
				if ptr, ok := thatRr.(*dns.PTR); ok {
					if a.Ptr == ptr.Ptr && a.Hdr.Name == ptr.Hdr.Name && a.Hdr.Ttl > ptr.Hdr.Ttl/2 {
						isUnknown = false
					}
				}
			case *dns.SRV:
				if srv, ok := thatRr.(*dns.SRV); ok {
					if a.Target == srv.Target && a.Port == srv.Port && a.Hdr.Name == srv.Hdr.Name && a.Hdr.Ttl > srv.Hdr.Ttl/2 {
						isUnknown = false
					}
				}
			case *dns.TXT:
				if txt, ok := thatRr.(*dns.TXT); ok {
					if reflect.DeepEqual(a.Txt, txt.Txt) && a.Hdr.Ttl > txt.Hdr.Ttl/2 {
						isUnknown = false
					}
				}
			}
		}

		if isUnknown {
			result = append(result, thatRr)
		}
	}

	return result
}
16519
func (p *pool) remove(id uint32) {
	p.Lock()
	defer p.Unlock()
	delete(p.plugins, id)
}