// FindAll finds all relative prefix keys against to the input `key` and
// all matched keys that starts with the input `key` in the trie.
// It returns the result of (FindByPrefixAll() + FindMatchingPrefixAll())
FindAll finds all relative prefix keys against to the input `key` and
all matched keys that starts with the input `key` in the trie.
It returns the result of (FindByPrefixAll() + FindMatchingPrefixAll())
// FindAll finds all relative prefix keys against to the input ` key ` and // all matched keys that starts with the input ` key ` in the trie . // It returns the result of ( FindByPrefixAll () + FindMatchingPrefixAll () )
func (t *Trie) FindAll(key string) map[string]interface{} {
	t.mu.RLock()
	defer t.mu.RUnlock()
	m := make(map[string]interface{})
	node := findNode(t.root, []rune(key))
	if node != nil {
		m = collectAll(node)
	}
	nodes, ok := t.findPrefixMatchNodes(key)
	if ok {
		for _, n := range nodes {
			m[n.path] = n.value
		}
	}
	return m
}
func ( t * Trie ) FindAll ( key string ) map [ string ] interface { } { t . mu . RLock ( ) defer t . mu . RUnlock ( ) m := make ( map [ string ] interface { } ) node := findNode ( t . root , [ ] rune ( key ) ) if node != nil { m = collectAll ( node ) } nodes , ok := t . findPrefixMatchNodes ( key ) if ok { for _ , n := range nodes { m [ n . path ] = n . value } } return m }
FindAll finds all relative prefix keys against to the input `key` and
all matched keys that starts with the input `key` in the trie.
FindAll finds all relative prefix keys against to the input ` key ` and all matched keys that starts with the input ` key ` in the trie .