// Set sets the account at the given index in the slice.
328816
func (a *Accounts) Set(index int, account *Account) error {
	if index < 0 || index >= len(a.accounts) {
		return errors.New("index out of bounds")
	}
	a.accounts[index] = account.account
	return nil
}
512061
func (s Session) Set(key string, value interface{}) error {
	if value == nil {
		s.Del(key)
		return nil
	}

	s[key] = value
	return nil
}
592372
func (a *allocNameIndex) Set(set allocSet) {
	for _, alloc := range set {
		a.b.Set(alloc.Index())
	}
}
1235055
func (list *List) Set(idx int, value Value) {
	list.values[idx] = value
}
781733
func (s Store) Set(key string, value string) {
	s.Lock()
	s.m[key] = KVPair{key, value}
	s.Unlock()
}
1264458
func (i *Int64Value) Set(s string) error {
	v, err := strconv.ParseInt(s, 0, 64)
	*i = Int64Value(v)
	return err
}
119829
func (st *Stacks) Set(idx, val int) {
	var ini int64 = 0
	(*st)[idx] = &ini
	atomic.StoreInt64((*st)[idx], int64(val))
}
215972
func (smap *syncedMap) Set(key interface{}, val interface{}) {
	smap.Lock()
	defer smap.Unlock()

	smap.data[key] = val
}
848408
func (r *Redis) Set(key string, value interface{}) error {
	return r.Client.Set(key, convertToBytes(value), 0).Err()
}
1343726
func (s *MemorySession) Set(key string, value interface{}) error {
	s.data[key] = value
	return nil
}
104361
func (c *PoolInfoCache) Set(hash chainhash.Hash, p *apitypes.TicketPoolInfo) {
	c.mtx.Lock()
	defer c.mtx.Unlock()
	c.poolInfo[hash] = p
	if len(c.expireQueue)+1 >= c.maxSize {
		expireHash := c.expireQueue[0]
		c.expireQueue = c.expireQueue[1:]
		delete(c.poolInfo, expireHash)
	}
	c.expireQueue = append(c.expireQueue, hash)
}
313220
func (f *BatchFuture) Set(index uint64, err error) {
	f.index = index
	f.err = err
	close(f.waitCh)
}
700458
func (r *RedisStorer) Set(key, value string) error {
	return r.client.Set(key, value, r.maxAge).Err()
}
985941
func (u *URI) Set(value string) error {
	uri, err := NewURIFromAddress(value)
	if err != nil {
		return err
	}
	*u = *uri
	return nil
}
711247
func (u *utxoStore) Set(txHash string, txIndex uint32, addrs []string, val int64) {
	u.Lock()
	defer u.Unlock()
	u.set(txHash, txIndex, addrs, val)
}
1278271
func (t *JSONToken) Set(key string, value string) {
	if t.claims == nil {
		t.claims = make(map[string]string)
	}
	t.claims[key] = value
}
531540
func (c *xContext) Set(key string, val interface{}) {
	c.store.Set(key, val)
}