// TryGet returns the value for key stored in the trie.
// The value bytes must not be modified by the caller.
// If a node was not found in the database, a MissingNodeError is returned.
771693
func (t *SecureTrie) TryGet(key []byte) ([]byte, error) {
	return t.trie.TryGet(t.hashKey(key))
}
1321620
func (t *Mutable) Get(key []byte) []byte {
	if node, _ := t.get(key); node != nil {
		return node.value
	}
	return nil
}
325951
func (t *Trie) insert(key []byte, value interface{}, replace bool) bool {
	// an empty tree
	if t.size == 0 {
		t.root.external = &external{
			key:   key,
			value: value,
		}
		t.size = 1
		return true
	}

	n := t.search(key)
	newOffset, newBit, newCont := n.external.criticalBit(key)

	// already exists in the tree
	if newOffset == -1 {
		if replace {
			n.external.value = value
			return true
		}
		return false
	}

	// allocate new node
	newNode := &internal{
		offset: newOffset,
		bit:    newBit,
		cont:   newCont,
	}
	direction := newNode.direction(key)
	newNode.child[direction].external = &external{
		key:   key,
		value: value,
	}

	// insert new node
	wherep := &t.root
	for in := wherep.internal; in != nil; in = wherep.internal {
		if in.offset > newOffset || (in.offset == newOffset && in.bit < newBit) {
			break
		}
		wherep = &in.child[in.direction(key)]
	}

	if wherep.internal != nil {
		newNode.child[1-direction].internal = wherep.internal
	} else {
		newNode.child[1-direction].external = wherep.external
		wherep.external = nil
	}
	wherep.internal = newNode
	t.size += 1
	return true
}
563119
func (k *ArrayKeyring) Get(key string) (Item, error) {
	if i, ok := k.items[key]; ok {
		return i, nil
	}
	return Item{}, ErrKeyNotFound
}
84097
func (n *rootNode) Get(key string) (inner Node) {

	// the child key path
	path := n.keyPath(key)

	// if there is previous error, inherit
	if err := n.ParseError(); err != nil {
		return &rootNode{
			path: path,
			err:  err,
		}
	}

	if err := n.genMapBuf(); err != nil {
		if err == ErrorNotObject {
			path = n.path // fallback to the parent entity
		}
		inner = &rootNode{
			path: path,
			err: Error{
				Path: "json" + path,
				Err:  err,
			},
		}
	} else if val, ok := n.mapBuf[key]; !ok {
		inner = &rootNode{
			path: path,
			err: Error{
				Path: "json" + path,
				Err:  ErrorUndefined,
			},
		}
	} else {
		val.path = path
		inner = &val
	}
	return
}
733744
func (s *SkipList) Get(key interface{}) (value interface{}, ok bool) {
	candidate := s.getPath(s.header, nil, key)

	if candidate == nil || candidate.key != key {
		return nil, false
	}

	return candidate.value, true
}
217779
func (rr *RoundRobin) TryGet() (resource Resource, err error) {
	return rr.get(false)
}
1059998
func (t *Trie) Get(key []byte) (value interface{}, ok bool) {
	if n := t.search(key); n.external != nil && bytes.Equal(n.external.key, key) {
		return n.external.value, true
	}
	return
}
726019
func (ls *LState) RawGet(tb *LTable, key LValue) LValue {
	return tb.RawGet(key)
}
198015
func (t *Tree) Find(key interface{}) interface{} {
	if key != nil && t.root != nil {
		d := &findData{key, t.compare}
		node := d.finder(t.root)
		if node != nil {
			return node.value
		}
	}

	return nil
}
1251717
func (d *Database) Get(path string) *Node {
	d.mtx.RLock()
	defer d.mtx.RUnlock()

	current := d.root
	if path == "" {
		return current
	}

	rabbitHole := strings.Split(path, "/")
	for i := 0; i < len(rabbitHole); i++ {
		var ok bool
		current, ok = current.Children[rabbitHole[i]]
		if !ok {
			return nil
		}
	}
	return current
}
286369
func (m *MockNodeInterface) Get(arg0 string, arg1 v10.GetOptions) (*v1.Node, error) {
	ret := m.ctrl.Call(m, "Get", arg0, arg1)
	ret0, _ := ret[0].(*v1.Node)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
989658
func (r *ConnectionValues) Get(key string) interface{} {
	args := *r
	n := len(args)
	for i := 0; i < n; i++ {
		kv := &args[i]
		if string(kv.key) == key {
			return kv.value
		}
	}
	return nil
}
451211
func (t *tree) Get(k uint64) (v *roaring.Container, ok bool) {
	q := t.r
	if q == nil {
		return
	}

	for {
		var i int
		if i, ok = t.find(q, k); ok {
			switch x := q.(type) {
			case *x:
				q = x.x[i+1].ch
				continue
			case *d:
				return x.d[i].v, true
			}
		}
		switch x := q.(type) {
		case *x:
			q = x.x[i].ch
		default:
			return
		}
	}
}
819422
func (d *ResourceDiff) Get(key string) interface{} {
	r, _ := d.GetOk(key)
	return r
}
209650
func (m *Miniredis) CheckGet(t T, key, expected string) {
	found, err := m.Get(key)
	if err != nil {
		lError(t, "GET error, key %#v: %v", key, err)
		return
	}
	if found != expected {
		lError(t, "GET error, key %#v: Expected %#v, got %#v", key, expected, found)
		return
	}
}
191504
func (c *Context) MustGet(key string) interface{} {
	if value, exists := c.Get(key); exists {
		return value
	}
	panic("Key \"" + key + "\" does not exist")
}