// Set sets a key
167577
func (c *Client) Set(key, value string) error {
	key = strings.ToUpper(key)
	if value != "" {
		value = " " + value
	}
	val := "SET" + key + value + "\n"
	if _, err := c.in.Write([]byte(val)); err != nil {
		return err
	}
	line, _, _ := c.out.ReadLine()
	if string(line) != "OK" {
		return errors.Errorf("error: %s", line)
	}
	return nil
}
516320
func (h Hash) Set(key string, value interface{}) Hash {
	h[key] = Value(valueToBytes(value))
	return h
}
962333
func (c *Cookies) Set(key, value string) {
	c.Mu.Lock()
	if c.Storage == nil {
		c.Storage = make(map[string]string, zero)
	}
	c.Storage[key] = value
	c.Mu.Unlock()
}
579991
func (c *Context) Set(key string, value interface{}) {
	c.Context = context.WithValue(c.Context, key, value)
}
1087618
func (p *Parameters) Set(key, value []byte) {
	p.bytes += len(key) + len(value)

	if p.pos < len(p.arr) {
		p.arr[p.pos] = pair{key, value}
		p.pos++
		return
	}

	if p.dyn == nil {
		p.dyn = make([]pair, len(p.arr), len(p.arr)+1)
		copy(p.dyn, p.arr[:])
	}
	p.dyn = append(p.dyn, pair{key, value})
}
259180
func (c *Cache) Set(key string, resp []byte) {
	c.db.Put([]byte(key), resp, nil)
}
1072659
func (ctx *Context) Set(key, value string) {
	ctx.SetHeader(key, value)
}
1343726
func (s *MemorySession) Set(key string, value interface{}) error {
	s.data[key] = value
	return nil
}
230343
func (h *envHandler) Set(key string, value interface{}, args ...interface{}) error {
	if len(args) != 0 {
		return cfg.ErrArgsNotSupported
	}
	sval, err := cfg.ToString(value)
	if err != nil {
		return cfg.ErrBadType
	}

	err = os.Setenv(key, sval)
	if err != nil {
		return cfg.ErrKeyNotSet
	}

	return nil
}
714880
func (s *PostgresStore) Set(key, value interface{}) error {
	s.lock.Lock()
	defer s.lock.Unlock()

	s.data[key] = value
	return nil
}
188283
func (rkv *KeyValue) Set(key, value string) error {
	conn := rkv.pool.Get(rkv.dbindex)
	_, err := conn.Do("SET", rkv.id+":"+key, value)
	return err
}
1349580
func (r *ConnectionValues) Set(key string, value interface{}) {
	args := *r
	n := len(args)
	for i := 0; i < n; i++ {
		kv := &args[i]
		if string(kv.key) == key {
			kv.value = value
			return
		}
	}

	c := cap(args)
	if c > n {
		args = args[:n+1]
		kv := &args[n]
		kv.key = append(kv.key[:0], key...)
		kv.value = value
		*r = args
		return
	}

	kv := connectionValue{}
	kv.key = append(kv.key[:0], key...)
	kv.value = value
	*r = append(args, kv)
}
975170
func (r *MemoryNoTS) Set(key string, value interface{}) error {
	r.items[key] = value
	return nil
}
312712
func (s setMap) Set(key string, value interface{}) {
	if reflect.ValueOf(value).IsNil() {
		return
	}

	s[key] = value
}
125734
func (v *String) Set(value string) {
	v.mu.Lock()
	v.s = value
	v.mu.Unlock()
}
1155015
func (c *Context) Set(key string, value interface{}) {
	c.data[key] = value
}
819391
func (t *TagMap) Set(key string) error {
	return (*stringmapflag.Value)(t).Set(key)
}