// Find finds the value of the key matching to the input `key` exactly.
Find finds the value of the key matching to the input `key` exactly.
// Find finds the value of the key matching to the input ` key ` exactly .
func (t *Trie) Find(key string) (interface{}, bool) {
	t.mu.RLock()
	defer t.mu.RUnlock()
	node := findNode(t.root, []rune(key))
	if node == nil {
		return nil, false
	}
	node, ok := node.children[nul]
	if !ok || !node.term {
		return nil, false
	}
	return node.value, true
}
func ( t * Trie ) Find ( key string ) ( interface { } , bool ) { t . mu . RLock ( ) defer t . mu . RUnlock ( ) node := findNode ( t . root , [ ] rune ( key ) ) if node == nil { return nil , false } node , ok := node . children [ nul ] if ! ok || ! node . term { return nil , false } return node . value , true }
Find finds the value of the key matching to the input `key` exactly.
Find finds the value of the key matching to the input ` key ` exactly .