// FindRelativeAll finds all relative keys against to the input `key`.
// It returns the result of (FindByPrefix + FindMatchingPrefix + FindByFuzzy)
FindRelativeAll finds all relative keys against to the input `key`.
It returns the result of (FindByPrefix + FindMatchingPrefix + FindByFuzzy)
// FindRelativeAll finds all relative keys against to the input ` key ` . // It returns the result of ( FindByPrefix + FindMatchingPrefix + FindByFuzzy )
func (t *Trie) FindRelativeAll(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
		}
	}
	fm := t.FindByFuzzyAll(key)
	for k, v := range fm {
		m[k] = v
	}
	return m
}
func ( t * Trie ) FindRelativeAll ( 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 } } fm := t . FindByFuzzyAll ( key ) for k , v := range fm { m [ k ] = v } return m }
FindRelativeAll finds all relative keys against to the input `key`.
FindRelativeAll finds all relative keys against to the input ` key ` .