// Reset is an action that resets the form of the first node matching the
// selector belongs to.
514095
func Reset(sel interface{}, opts ...QueryOption) Action {
	return QueryAfter(sel, func(ctx context.Context, nodes ...*cdp.Node) error {
		if len(nodes) < 1 {
			return fmt.Errorf("selector `%s` did not return any nodes", sel)
		}

		var res bool
		err := EvaluateAsDevTools(fmt.Sprintf(resetJS, nodes[0].FullXPath()), &res).Do(ctx)
		if err != nil {
			return err
		}

		if !res {
			return fmt.Errorf("could not call reset on node %d", nodes[0].NodeID)
		}

		return nil
	}, opts...)
}
1083951
func (iter *Iterator) Reset(reader io.Reader) *Iterator {
	iter.reader = reader
	iter.head = 0
	iter.tail = 0
	return iter
}
756614
func (c *Cache) Reset() {
	c.lock.Lock()
	defer c.lock.Unlock()

	c.cache = make(map[interface{}]*list.Element)
	c.lru.Init()
}
1186317
func (net *Network) Reset() {
	net.lock.Lock()
	defer net.lock.Unlock()

	//re-initialize the maps
	net.connMap = make(map[string]int)
	net.nodeMap = make(map[enode.ID]int)

	net.Nodes = nil
	net.Conns = nil
}
274492
func (d *DepthFirst) Reset() {
	d.stack = d.stack[:0]
	if d.visited != nil {
		d.visited.Clear()
	}
}
1091596
func (r *Reader) Reset() {
	if r.structTypeRef != nil {
		r.structTypeRef = r.structTypeRef[:0]
	}
	if r.fieldsRef != nil {
		r.fieldsRef = r.fieldsRef[:0]
	}
	if r.Simple {
		return
	}
	if r.ref != nil {
		r.ref = r.ref[:0]
	}
}
339435
func (b *BreadthFirst) Reset() {
	b.queue.Reset()
	if b.visited != nil {
		b.visited.Clear()
	}
}
150479
func (self *Graph) Reset() {
	self.edges = make(map[uint32](map[uint32]float64))
	self.nodes = make(map[uint32]*node)
}
37070
func (d *DeferredDiscoveryRESTMapper) Reset() {
	klog.V(5).Info("Invalidating discovery information")

	d.initMu.Lock()
	defer d.initMu.Unlock()

	d.cl.Invalidate()
	d.delegate = nil
}
1261431
func (c *chain) Reset() {
	for i, l := range c.link {
		if l.t != nil {
			l.t.Reset()
		}
		c.link[i].p, c.link[i].n = 0, 0
	}
}
1115085
func (it *Count) Reset() {
	it.done = false
	it.result = nil
	it.it.Reset()
}
398443
func (s *scheduler) reset() {
	s.lock.Lock()
	defer s.lock.Unlock()

	for section, res := range s.responses {
		if res.cached == nil {
			delete(s.responses, section)
		}
	}
}
406387
func (enc *ProtoEncoder) Reset(w io.Writer) {
	enc.pBuf.Reset()
	enc.w = w
}
365272
func (d *RabinKarp64) Reset() {
	d.tables = nil
	d.value = 0
	d.window = d.window[:0]
	d.oldest = 0
	d.updateTables()
}
1328719
func (c *Context) reset() {
	c.Writer = &c.writermem
	c.Params = c.Params[0:0]
	c.handlers = nil
	c.index = -1
	c.Keys = nil
	c.Errors = c.Errors[0:0]
	c.Accepted = nil
}
200334
func reset() {
	registeredVersions = map[unversioned.GroupVersion]struct{}{}
	enabledVersions = map[unversioned.GroupVersion]struct{}{}
	groupMetaMap = map[string]*apimachinery.GroupMeta{}

}
70136
func (n *NamespacedKV) Reset() {
	it := n.db.NewIterator(util.BytesPrefix(n.prefix), nil)
	defer it.Release()
	batch := n.db.newBatch()
	for it.Next() {
		batch.Delete(it.Key())
		batch.checkFlush()
	}
	batch.flush()
}