// RemoveSubsection remove	s a subsection from a config file.
499287
func (c *Config) RemoveSubsection(section string, subsection string) *Config {
	for _, s := range c.Sections {
		if s.IsName(section) {
			result := Subsections{}
			for _, ss := range s.Subsections {
				if !ss.IsName(subsection) {
					result = append(result, ss)
				}
			}
			s.Subsections = result
		}
	}

	return c
}
839301
func (s *stack) Remove() interface{} {
	if s.length == 0 {
		panic("underflow")
	}
	s.length--
	item := s.data[s.length]
	s.data[s.length] = nil
	return item
}
1192949
func (s *Subsection) Option(key string) string {
	return s.Options.Get(key)
}
605656
func removeSubstringsFromString(sourceStr string, stringsToStrip []string) string {
	theNewString := sourceStr
	for _, i := range stringsToStrip {
		theNewString = strings.Replace(theNewString, i, "", -1)
	}
	return theNewString
}
655196
func (fs *Filespace) RemoveAll(subPath string) error {
	return os.RemoveAll(fs.path + subPath)
}
819477
func (s *Section) RemoveKey(key string) {
	k, pos := s.getKey(key)
	if k != nil {
		s.file.lines = append(s.file.lines[:pos], s.file.lines[pos+1:]...)

		// find place in s.keys
		idx := 0
		for ; idx < len(s.keys); idx++ {
			if s.file.KeyCompFunc(key, s.keys[idx]) {
				break
			}
		}

		// remove from s.keys
		s.keys = append(s.keys[:idx], s.keys[idx+1:]...)
	}
}
355376
func (n *NIC) RemoveSubnet(subnet tcpip.Subnet) {
	n.mu.Lock()

	// Use the same underlying array.
	tmp := n.subnets[:0]
	for _, sub := range n.subnets {
		if sub != subnet {
			tmp = append(tmp, sub)
		}
	}
	n.subnets = tmp

	n.mu.Unlock()
}
1047417
func (c *Config) RemoveSection(name string) *Config {
	result := Sections{}
	for _, s := range c.Sections {
		if !s.IsName(name) {
			result = append(result, s)
		}
	}

	c.Sections = result
	return c
}
935918
func (c *ConfigFile) GetSection(section string) (map[string]string, error) {
	// Blank section name represents DEFAULT section.
	if len(section) == 0 {
		section = DEFAULT_SECTION
	}

	// Check if section exists.
	if _, ok := c.data[section]; !ok {
		// Section does not exist.
		return nil, getError{ErrSectionNotFound, section}
	}

	// Remove pre-defined key.
	secMap := c.data[section]
	delete(c.data[section], " ")

	// Section exists.
	return secMap, nil
}
1327306
func (fs *Filespace) Remove(subPath string) error {
	return fs.root.Remove(subPath, true)
}
249847
func (f *wsClientFilter) removeUnspentOutPoint(op *wire.OutPoint) {
	delete(f.unspent, *op)
}
113958
func (c *Config) Section(name string) *Section {
	for i := len(c.Sections) - 1; i >= 0; i-- {
		s := c.Sections[i]
		if s.IsName(name) {
			return s
		}
	}

	s := &Section{Name: name}
	c.Sections = append(c.Sections, s)
	return s
}
871765
func (c *googlePubSubConsumer) Remove() error {
	ctx, _ := context.WithTimeout(context.Background(), 10*time.Second)
	return c.Subscription.Delete(ctx)
}
542823
func (b *SampleFJSONBuilder) Remove(info *SampleFPropertyInfo) *SampleFJSONBuilder {
	delete(b._properties, info.fieldName)
	return b
}
734020
func (f *srvFile) Remove() {
	f.Lock()
	if (f.flags & Fremoved) != 0 {
		f.Unlock()
		return
	}

	f.flags |= Fremoved
	f.Unlock()

	p := f.Parent
	p.Lock()
	if f.next != nil {
		f.next.prev = f.prev
	} else {
		p.clast = f.prev
	}

	if f.prev != nil {
		f.prev.next = f.next
	} else {
		p.cfirst = f.next
	}

	f.next = nil
	f.prev = nil
	p.Unlock()
}
310819
func (s *Section) Subsection(name string) *Subsection {
	for i := len(s.Subsections) - 1; i >= 0; i-- {
		ss := s.Subsections[i]
		if ss.IsName(name) {
			return ss
		}
	}

	ss := &Subsection{Name: name}
	s.Subsections = append(s.Subsections, ss)
	return ss
}
242872
func (s *Sublist) removeFromNode(n *node, sub *subscription) (found bool) {
	if n == nil {
		return false
	}
	if sub.queue == nil {
		_, found = n.psubs[sub]
		delete(n.psubs, sub)
		if found && n.plist != nil {
			// This will brute force remove the plist to perform
			// correct behavior. Will get re-populated on a call
			// to Match as needed.
			n.plist = nil
		}
		return found
	}

	// We have a queue group subscription here
	qsub := n.qsubs[string(sub.queue)]
	_, found = qsub[sub]
	delete(qsub, sub)
	if len(qsub) == 0 {
		delete(n.qsubs, string(sub.queue))
	}
	return found
}