// Redis LSET command.
499335
func (c *asyncClient) Lset(arg0 string, arg1 int64, arg2 []byte) (stat FutureBool, err Error) {
	arg0bytes := []byte(arg0)
	arg1bytes := []byte(strconv.FormatInt(arg1, 10))
	arg2bytes := arg2

	resp, err := c.conn.QueueRequest(&LSET, [][]byte{arg0bytes, arg1bytes, arg2bytes})
	if err == nil {
		stat = resp.future.(FutureBool)
	}

	return
}
570570
func (i RedisClientWrapper) Set(key string, val []byte) error {
	err := i.Client.Set(key, val, 0).Err()
	return err
}
94331
func (h Handler) Set(cmd common.SetRequest) error {
	_, err := h.doRequest(cmd, common.RequestSet)
	return err
}
1315397
func (r *Redis) GetSet(key, value string) ([]byte, error) {
	rp, err := r.ExecuteCommand("GETSET", key, value)
	if err != nil {
		return nil, err
	}
	return rp.BytesValue()
}
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()
}
1136244
func (c cache) Set(key string, resp []byte) {
	c.Do("SET", cacheKey(key), resp)
}
448136
func (db *RedisDB) HSet(k, f, v string) {
	db.master.Lock()
	defer db.master.Unlock()
	db.hashSet(k, f, v)
}
365766
func (s *redisStorage) Set(key string, val interface{}, expires time.Duration) error {
	item := &cachedItem{Val: val}
	value, err := encodeGob(item)
	if err != nil {
		return err
	}

	status := s.c.SetEx(key, expires, string(value))
	return status.Err()
}
1178556
func (db *RedisDB) hashSet(k, f, v string) bool {
	if t, ok := db.keys[k]; ok && t != "hash" {
		db.del(k, true)
	}
	db.keys[k] = "hash"
	if _, ok := db.hashKeys[k]; !ok {
		db.hashKeys[k] = map[string]string{}
	}
	_, ok := db.hashKeys[k][f]
	db.hashKeys[k][f] = v
	db.keyVersion[k]++
	return ok
}
735614
func StringsSet(in []string) map[string]struct{} {
	if in == nil {
		return nil
	}
	out := make(map[string]struct{})
	for _, v := range in {
		out[v] = struct{}{}
	}
	return out
}
230915
func (nl *NetAddrList) Set(s string) error {
	v, err := ParseAddr(s)
	if err != nil {
		return err
	}

	*nl = append(*nl, *v)
	return nil
}
414621
func (db *RedisDB) sortedSet(key string) map[string]float64 {
	ss := db.sortedsetKeys[key]
	return map[string]float64(ss)
}
501879
func (h Handler) Set(cmd common.SetRequest) error {
	if err := binprot.WriteSetCmd(h.rw.Writer, cmd.Key, cmd.Flags, cmd.Exptime, uint32(len(cmd.Data)), 0); err != nil {
		return err
	}
	return h.handleSetCommon(cmd)
}
592372
func (a *allocNameIndex) Set(set allocSet) {
	for _, alloc := range set {
		a.b.Set(alloc.Index())
	}
}
51506
func (t *transaction) debugSet(setName string) {
	t.command("ZRANGE", redis.Args{setName, 0, -1, "WITHSCORES"}, func(reply interface{}) error {
		vals, err := redis.Strings(reply, nil)
		if err != nil {
			return err
		}
		fmt.Printf("%s: %v\n", setName, vals)
		return nil
	})
}
882257
func (r RedisPipeline) MGet(keys ...string) *redis.SliceCmd {
	return r.pipeline.MGet(keys...)
}
622057
func (lia *ListIntVar) Set(input string) error {
	lsa := strings.Split(input, ",")
	*lia = make([]int, len(lsa))
	for i, s := range lsa {
		iv, err := strconv.Atoi(s)
		if err != nil {
			return err
		}
		(*lia)[i] = iv
	}
	return nil
}