// Clear clears the change list
// N.B. archiving not currently implemented
550634
func (cl FileChangelist) Clear(archive string) error {
	dir, err := os.Open(cl.dir)
	if err != nil {
		return err
	}
	defer dir.Close()
	files, err := dir.Readdir(0)
	if err != nil {
		return err
	}
	for _, f := range files {
		os.Remove(filepath.Join(cl.dir, f.Name()))
	}
	return nil
}
513415
func (v *View) Clear() {
	v.tainted = true

	v.lines = nil
	v.viewLines = nil
	v.readOffset = 0
	v.clearRunes()
}
934630
func (o *Options) Clear() {
	o.Name = ""
	o.Cron = ""
	o.Every = Duration{}
	o.Offset = nil
	o.Concurrency = nil
	o.Retry = nil
}
579426
func (i *ConfirmModal) Clear() {
	i.title = ""
	i.text = ""
	i.accepted = false
	i.isDone = false
}
1210787
func (c *Cache) Clear() {
	c.Lock()
	defer c.Unlock()
	if c.onEvicted != nil {
		for _, ci := range c.cache {
			c.onEvicted(ci.itemID, ci.value)
		}
	}
	c.cache = make(map[string]*cachedItem)
	c.groups = make(map[string]map[string]struct{})
	c.lruIdx = c.lruIdx.Init()
	c.lruRefs = make(map[string]*list.Element)
	c.ttlIdx = c.ttlIdx.Init()
	c.ttlRefs = make(map[string]*list.Element)
}
715077
func (h *Handlers) Clear() {
	h.Validate.Clear()
	h.Build.Clear()
	h.Send.Clear()
	h.Sign.Clear()
	h.Unmarshal.Clear()
	h.UnmarshalStream.Clear()
	h.UnmarshalMeta.Clear()
	h.UnmarshalError.Clear()
	h.ValidateResponse.Clear()
	h.Retry.Clear()
	h.AfterRetry.Clear()
	h.CompleteAttempt.Clear()
	h.Complete.Clear()
}
221065
func (lru *LRUCache) Clear() {
	lru.mu.Lock()
	defer lru.mu.Unlock()

	lru.list.Init()
	lru.table = make(map[string]*list.Element)
	lru.size = 0
}
831321
func (mem *memNamedMapping) Clear() {
	names := mem.ListAllNames()
	for _, item := range names {
		mem.removeNameIdxSync(item)
	}
}
1060450
func (b *Builder) Clear() {
	b.buf = nil
	b.stack.Clear()
	b.keyWritten = false
}
924117
func (f *Flash) Clear() {
	if f.Count() > 0 {
		f.changed = true
	}
	f.v = nil
}
99037
func (ht *HashTable) Clear() (err error) {
	if err = ht.DataFile.Clear(); err != nil {
		return
	}
	ht.calculateNumBuckets()
	return
}
952696
func (slist *syncedList) Clear() {
	slist.Lock()
	defer slist.Unlock()

	slist.queue.Init()
}
773693
func (s *UniformSample) Clear() {
	s.mutex.Lock()
	defer s.mutex.Unlock()
	s.count = 0
	s.values = make([]int64, 0, s.reservoirSize)
}
797427
func (f *FunctionStack) Clear() {
	f.lock.Lock()
	f.listeners = f.listeners[0:0]
	f.lock.Unlock()
}
497750
func (h *Handle) Clear() {
	h.mu.Lock()
	h.StatsCache.Store(StatsCache{})
	h.mu.lastVersion = 0
	for len(h.ddlEventCh) > 0 {
		<-h.ddlEventCh
	}
	h.feedback = h.feedback[:0]
	h.mu.ctx.GetSessionVars().InitChunkSize = 1
	h.mu.ctx.GetSessionVars().MaxChunkSize = 32
	h.listHead = &SessionStatsCollector{mapper: make(tableDeltaMap), rateMap: make(errorRateDeltaMap)}
	h.globalMap = make(tableDeltaMap)
	h.mu.rateMap = make(errorRateDeltaMap)
	h.mu.Unlock()
}
1161596
func (db *Database) Clear(sid string) {
	prefix := makePrefix(sid)

	txn := db.Service.NewTransaction(true)
	defer txn.Commit(nil)

	iter := txn.NewIterator(iterOptionsNoValues)
	defer iter.Close()

	for iter.Rewind(); iter.ValidForPrefix(prefix); iter.Next() {
		txn.Delete(iter.Item().Key())
	}
}
413489
func (s *Session) Clear() {
	s.Lock()
	defer s.Unlock()

	s.uid = ""
	s.data = map[string]interface{}{}
	s.updateEncodedData()
}