// Get returns a bucket for a given key
505839
func (s *StoragePacker) GetBucket(key string) (*Bucket, error) {
	if key == "" {
		return nil, fmt.Errorf("missing bucket key")
	}

	lock := locksutil.LockForKey(s.storageLocks, key)
	lock.RLock()
	defer lock.RUnlock()

	// Read from the underlying view
	storageEntry, err := s.view.Get(context.Background(), key)
	if err != nil {
		return nil, errwrap.Wrapf("failed to read packed storage entry: {{err}}", err)
	}
	if storageEntry == nil {
		return nil, nil
	}

	uncompressedData, notCompressed, err := compressutil.Decompress(storageEntry.Value)
	if err != nil {
		return nil, errwrap.Wrapf("failed to decompress packed storage entry: {{err}}", err)
	}
	if notCompressed {
		uncompressedData = storageEntry.Value
	}

	var bucket Bucket
	err = proto.Unmarshal(uncompressedData, &bucket)
	if err != nil {
		return nil, errwrap.Wrapf("failed to decode packed storage entry: {{err}}", err)
	}

	return &bucket, nil
}
243366
func (scope *ArgScope) Get(key string) (interface{}, error) {
	return scope.data[key], nil
}
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
}
1229772
func (b *Bucket) Get(ctx context.Context, path string) (data []byte, err error) {
	body, err := b.GetReader(ctx, path)
	defer func() {
		if body != nil {
			body.Close()
		}
	}()
	if err != nil {
		return nil, err
	}
	data, err = ioutil.ReadAll(body)
	return data, err
}
698388
func (d *Datastore) Get(k ds.Key) ([]byte, error) {
	o, ok := d.buffer[k]
	if ok {
		if o.delete {
			return nil, ds.ErrNotFound
		}
		return o.value, nil
	}

	return d.child.Get(k)
}
636801
func (h *Heap) Get(obj interface{}) (interface{}, bool, error) {
	key, err := h.data.keyFunc(obj)
	if err != nil {
		return nil, false, KeyError{obj, err}
	}
	return h.GetByKey(key)
}
269143
func (fi *FastIntegerHashMap) Get(key uint64) (uint64, bool) {
	return fi.packets.get(key)
}
442221
func (c *BigCache) Get(key string) ([]byte, error) {
	hashedKey := c.hash.Sum64(key)
	shard := c.getShard(hashedKey)
	return shard.get(key, hashedKey)
}
688754
func (p Params) Get(key string) string {
	if p == nil {
		return ""
	}
	return p[key]
}
1309362
func (s *MemcacheStore) Get(key interface{}) interface{} {
	s.lock.RLock()
	defer s.lock.RUnlock()

	return s.data[key]
}
214023
func (c *fileCache) Get(key string) ([]byte, error) {
	cached, err := ioutil.ReadFile(c.filename(key))
	if err != nil {
		// check the error
		if _, ok := err.(*os.PathError); !ok {
			return nil, err
		}
	}

	return cached, nil
}
1321620
func (t *Mutable) Get(key []byte) []byte {
	if node, _ := t.get(key); node != nil {
		return node.value
	}
	return nil
}
277109
func (s *Session) Get(key string) interface{} {
	if s.data == nil {
		return nil
	}
	return s.data[key]
}
1288446
func (m *Client) Get(ctx context.Context, name string) (cloudstorage.Object, error) {
	if !m.Exists(name) {
		return nil, cloudstorage.ErrObjectNotFound
	}
	get := Concat(m.bucket, name)
	//gou.DebugCtx(m.clientCtx, "getting file %s", get)
	f, err := m.client.Stat(get)
	if err != nil {
		return nil, err
	}
	return newObjectFromFile(m, get, f), nil
}
608004
func (database *Boltdb) Get(key string) interface{} {
	db := database.db
	if db == nil {
		log.Fatal("database is not opened yet.")
		return nil
	}
	var value interface{}
	err := db.View(func(tx *bolt.Tx) error {
		bucket := tx.Bucket([]byte("my_bucket"))
		if bucket == nil {
			log.Fatal("bucket not found")
			return nil
		}
		value = bucket.Get([]byte(key))
		return nil
	})
	if err != nil {
		return nil
	}
	return value
}
371743
func (c *MemcacheCacher) Get(key string) interface{} {
	item, err := c.c.Get(key)
	if err != nil {
		return nil
	}
	return string(item.Value)
}
300727
func (d *DB) Get(key string) (value string) {
	keyB := []byte(key)
	d.db.Update(func(tx *bolt.Tx) error {
		b := tx.Bucket(tableURLs)
		if b == nil {
			return nil
		}
		c := b.Cursor()
		for k, v := c.First(); k != nil; k, v = c.Next() {
			if bytes.Equal(keyB, k) {
				value = string(v)
				break
			}
		}

		return nil
	})

	return
}