// Get returns an item by id. Returned objects must never be modified.
333410
func (v *memdbView) Get(id string) (*Snapshot, error) {
	s, err := v.txn.First(memdbContainersTable, memdbIDIndex, id)
	if err != nil {
		return nil, err
	}
	if s == nil {
		return nil, NoSuchContainerError{id: id}
	}
	return v.transform(s.(*Container)), nil
}
996639
func (c *Collection) Get(i gtreap.Item) gtreap.Item {
	root := c.currentRoot()
	if root == nil {
		return nil
	}
	return root.Get(i)
}
779034
func (t *taskCollection) Get(id string) *task {
	t.Lock()
	defer t.Unlock()

	if t, ok := t.table[id]; ok {
		return t
	}
	return nil
}
480702
func (idx *ListIndex) Get(value []byte) []byte {
	c := idx.IndexBucket.Cursor()
	prefix := generatePrefix(value)

	for k, id := c.Seek(prefix); bytes.HasPrefix(k, prefix); k, id = c.Next() {
		return id
	}

	return nil
}
261458
func (networkApi *NetworkApi) Get(id string) (*Network, error) {
	data, err := networkApi.entityService.Get(id, map[string]string{})
	if err != nil {
		return nil, err
	}
	return parseNetwork(data), nil
}
1160482
func (db *Database) Get(sid string, key string) (value interface{}) {
	db.get(makeKey(sid, key), &value)
	return
}
244647
func (c *Client) Get(ctx context.Context, url string, id string, payload interface{}) error {
	url = fmt.Sprintf("%s/%s", url, id)
	req, err := c.NewRequest("GET", url, nil)
	if err != nil {
		return err
	}

	_, err = c.Do(ctx, req, payload)
	return err
}
243853
func Get(collectionName, id string) (*map[string]interface{}, error) {
	connection := shared.Connection()
	if connection == nil {
		return nil, errors.New("No connection to database server")
	}
	var result map[string]interface{}
	collection := connection.DB(variables.DBName).C(collectionName)
	err := collection.Find(bson.M{"_id": id}).One(&result)
	if err != nil {
		return nil, err
	}
	return &result, nil
}
753846
func (store *KapacitorStore) Get(ctx context.Context, id int) (chronograf.Server, error) {
	if store.Kapacitor == nil || store.Kapacitor.ID != id {
		return chronograf.Server{}, fmt.Errorf("unable to find Kapacitor with id %d", id)
	}
	return *store.Kapacitor, nil
}
1170921
func (self *Model) Get(id interface{}, into interface{}) error {
	if record, err := self.db.Retrieve(self.collection.Name, id); err == nil {
		return record.Populate(into, self.collection)
	} else {
		return err
	}
}
554049
func (c *attrCache) Get(id uint64) map[string]interface{} {
	c.mu.RLock()
	defer c.mu.RUnlock()
	attrs := c.attrs[id]
	if attrs == nil {
		return nil
	}

	// Make a copy for safety
	ret := make(map[string]interface{})
	for k, v := range attrs {
		ret[k] = v
	}
	return ret
}
837486
func (list *List) Get(idx int) (Value, error) {
	if idx > list.Length() {
		return nil, errors.New("index out of range")
	}
	return list.values[idx], nil
}
786260
func Get(id string, params *stripe.SourceObjectParams) (*stripe.Source, error) {
	return getC().Get(id, params)
}
705169
func (c Client) Get(id string, params *stripe.RadarValueListItemParams) (*stripe.RadarValueListItem, error) {
	path := stripe.FormatURLPath("/v1/radar/value_list_items/%s", id)
	vli := &stripe.RadarValueListItem{}
	err := c.B.Call(http.MethodGet, path, c.Key, params, vli)
	return vli, err
}
417084
func (f *DeltaFIFO) Get(obj interface{}) (item interface{}, exists bool, err error) {
	key, err := f.KeyOf(obj)
	if err != nil {
		return nil, false, KeyError{obj, err}
	}
	return f.GetByKey(key)
}
1280188
func (c *MemoryStore) Get(key string) (interface{}, error) {
	item, _ := c.cache.Get(key)
	return item, nil
}
919555
func (aa *AtomicArray) Get(idx int) interface{} {
	// do not lock if not needed
	if idx < 0 || idx >= aa.length {
		return nil
	}

	aa.mutex.RLock()
	res := aa.items[idx]
	aa.mutex.RUnlock()
	return res
}