// FindMatchingPrefixAll finds all the matched prefix keys and the values against to
// the input `key`. The keys returned are the prefixes of the input `key`.
FindMatchingPrefixAll finds all the matched prefix keys and the values against to
the input `key`. The keys returned are the prefixes of the input `key`.
// FindMatchingPrefixAll finds all the matched prefix keys and the values against to // the input ` key ` . The keys returned are the prefixes of the input ` key ` .
func (t *Trie) FindMatchingPrefixAll(key string) map[string]interface{} {
	t.mu.RLock()
	defer t.mu.RUnlock()
	m := make(map[string]interface{})
	nodes, ok := t.findPrefixMatchNodes(key)
	if ok {
		for _, n := range nodes {
			m[n.path] = n.value
		}
	}
	return m
}
func ( t * Trie ) FindMatchingPrefixAll ( key string ) map [ string ] interface { } { t . mu . RLock ( ) defer t . mu . RUnlock ( ) m := make ( map [ string ] interface { } ) nodes , ok := t . findPrefixMatchNodes ( key ) if ok { for _ , n := range nodes { m [ n . path ] = n . value } } return m }
FindMatchingPrefixAll finds all the matched prefix keys and the values against to
the input `key`.
FindMatchingPrefixAll finds all the matched prefix keys and the values against to the input ` key ` .