// Set applies the JSON pointer to the given item, and sets the
// value accordingly.
559261
func (p JSPointer) Set(item interface{}, value interface{}) error {
	var ctx matchCtx

	ctx.set = true
	ctx.raw = p.raw
	ctx.tokens = &p.tokens
	ctx.setvalue = value
	ctx.apply(item)
	return ctx.err
}
1192623
func (u *User) Set(key string, value interface{}) {
	// Get map shard.
	u.Lock()
	defer u.Unlock()
	u.data[key] = value
}
1190514
func (s *storeImpl) Set(key string, val interface{}) {
	s.mutex.Lock()
	defer s.mutex.Unlock()
	s.objects[key] = object{contents: val}
}
531573
func (f *Flash) Set(key string, value interface{}) {
	if !f.changed {
		f.changed = true
	}
	if f.v == nil {
		f.v = make(flashData)
	}
	f.v[key] = []interface{}{value}
}
714880
func (s *PostgresStore) Set(key, value interface{}) error {
	s.lock.Lock()
	defer s.lock.Unlock()

	s.data[key] = value
	return nil
}
1246744
func (c *SyncCollector) Set(k string, v interface{}) {
	c.rw.Lock()
	c.c.Set(k, v)
	c.rw.Unlock()
}
708173
func (aa *AtomicArray) Set(idx int, node interface{}) error {
	// do not lock if not needed
	if idx < 0 || idx >= aa.length {
		return fmt.Errorf("index %d is larger than array size (%d)", idx, aa.length)
	}

	aa.mutex.Lock()
	aa.items[idx] = node
	aa.mutex.Unlock()
	return nil
}
844643
func (t *Collection) Set(key []byte, val []byte) error {
	return t.SetItem(&Item{Key: key, Val: val, Priority: rand.Int31()})
}
161459
func (m *MemSwapBytes) Set(value string) error {
	if value == "-1" {
		*m = MemSwapBytes(-1)
		return nil
	}
	val, err := units.RAMInBytes(value)
	*m = MemSwapBytes(val)
	return err
}
251846
func (c *Context) Set(key string, value interface{}) {
	c.store.set(key, value)
}
206982
func (s *RedisMapStore) Set(key string, value interface{}, properties ...string) error {
	key, vmap, err := s.prepare(key, value, properties...)
	if err != nil {
		return err
	}
	if len(vmap) == 0 {
		return nil
	}
	return s.client.HMSet(key, vmap).Err()
}
697511
func (c *RawBinaryClient) Set(item *Item) MutateResponse {
	return c.mutate(opSet, item)
}
543322
func (fb *Firebase) Set(v interface{}) error {
	bytes, err := json.Marshal(v)
	if err != nil {
		return err
	}
	_, _, err = fb.doRequest("PUT", bytes)
	return err
}
700458
func (r *RedisStorer) Set(key, value string) error {
	return r.client.Set(key, value, r.maxAge).Err()
}
249261
func (c *Cache) Set(key string, resp []byte) {
	item := &memcache.Item{
		Key:   cacheKey(key),
		Value: resp,
	}
	c.Client.Set(item)
}
149708
func (m *MemBytes) Set(value string) error {
	val, err := units.RAMInBytes(value)
	*m = MemBytes(val)
	return err
}
121298
func (v Values) Set(key, value string) {
	v[key] = []string{value}
}