// Get returns a pointer to a new `Yaml` object for `key` in its `map` representation
//
// Example:
//      y.Get("xx").Get("yy").Int()
979390
func (y *Yaml) Get(key interface{}) *Yaml {
	m, err := y.Map()
	if err == nil {
		if val, ok := m[key]; ok {
			return &Yaml{val}
		}
	}
	return &Yaml{nil}
}
380720
func (c *SimpleLRUCache) Get(key string) (interface{}, bool) {
	data, ok := c.lruCache.Get(key)
	if data != nil && ok {
		var item cacheItem
		item, _ = data.(cacheItem)
		item.expires = timeFunc().Add(c.expiration) // update the expiration
		c.lruCache.Add(key, item)
		return item.value, true
	}
	return nil, false
}
552888
func (p *Params) Get(key string) string {
	if len(key) == 0 {
		return ""
	}
	if key[0] != ':' && key[0] != '*' {
		key = ":" + key
	}

	for _, v := range *p {
		if v.Name == key {
			return v.Value
		}
	}
	return ""
}
66755
func (d *Datastore) Get(k ds.Key) ([]byte, error) {
	var val []byte
	err := d.runOp(func() error {
		var err error
		val, err = d.Batching.Get(k)
		return err
	})

	return val, err
}
674622
func (smap *syncedMap) Get(key interface{}) (val interface{}, ok bool) {
	smap.RLock()
	defer smap.RUnlock()

	val, ok = smap.data[key]
	return
}
225929
func (s *shard) Get(key uint32) (interface{}, bool) {
	s.RLock()
	el, found := s.items[key]
	s.RUnlock()
	return el, found
}
484652
func (b *Backend) Get(ctx context.Context, key string) ([]byte, error) {
	return nil, errors.New("not implemented")
}
165086
func (hm *HashMap) Get(h Hashable) (interface{}, bool) {
	if _, ok := (*hm).keys[h.Hash()]; ok {
		v, ok := (*hm).values[h.Hash()]
		return v, ok
	}
	return nil, false
}
833609
func (env *Env) Get(key string) (value string) {
	// not using Map() because of the extra allocations https://github.com/docker/docker/pull/7488#issuecomment-51638315
	for _, kv := range *env {
		if strings.Index(kv, "=") == -1 {
			continue
		}
		parts := strings.SplitN(kv, "=", 2)
		if parts[0] != key {
			continue
		}
		if len(parts) < 2 {
			value = ""
		} else {
			value = parts[1]
		}
	}
	return
}
198165
func (m *MultiMap) Get(key interface{}) (values []interface{}, found bool) {
	values, found = m.m[key]
	return
}
1217081
func (s *Store) Get(i interface{}) error {
	location := s.Path(i)

	file, err := ioutil.ReadFile(location)
	if err != nil {
		return err
	}

	err = yaml.Unmarshal(file, i)
	if err != nil {
		return err
	}

	return nil
}
119432
func (kv *KV) Get(key []byte) (value []byte) {
	value, _ = kv.db.Get(key, nil)
	return
}
1103036
func (m mapFetcher) Get(key string) (val string, ok bool) {
	all := m.GetAll(key)

	if len(all) == 0 {
		return "", false
	}
	return all[len(all)-1], true
}
89115
func (c *Config) Get(key string) (v interface{}) {
	return c.GetKey(c.NewKey(key))
}
1143004
func (y *Yaml) GetMapKeys() ([]string, error) {
	m, err := y.Map()

	if err != nil {
		return nil, err
	}
	keys := make([]string, 0)
	for k, _ := range m {
		if s, ok := k.(string); ok {
			keys = append(keys, s)
		}
	}
	return keys, nil
}
1093234
func (d *MapDatastore) Get(key Key) (value []byte, err error) {
	val, found := d.values[key]
	if !found {
		return nil, ErrNotFound
	}
	return val, nil
}
811773
func (c *CMap) Get(key interface{}) (val interface{}) {
	c.mutex.RLock()
	val = c.items[key]
	c.mutex.RUnlock()
	return
}