// Clear removes all the keys and values of the trie.
Clear removes all the keys and values of the trie.
// Clear removes all the keys and values of the trie .
func (t *Trie) Clear() {
	t.mu.Lock()
	node := t.root
	for r, c := range node.children {
		delete(node.children, r)
		removeAll(c)
	}
	node.rval = 0
	node.path = ""
	node.term = false
	node.depth = 0
	node.value = nil
	node.mask = uint64(0)
	node.parent = nil
	node.termCount = 0
	t.mu.Unlock()
}
func ( t * Trie ) Clear ( ) { t . mu . Lock ( ) node := t . root for r , c := range node . children { delete ( node . children , r ) removeAll ( c ) } node . rval = 0 node . path = " " node . term = false node . depth = 0 node . value = nil node . mask = uint64 ( 0 ) node . parent = nil node . termCount = 0 t . mu . Unlock ( ) }
Clear removes all the keys and values of the trie.
Clear removes all the keys and values of the trie .
// keys := t.FindByPrefix("") // for i := range keys { // 	t.Remove(keys[i]) // }