//Set set key and value to map
193129
func (m *MapOfCharacterToGlyphIndex) Set(k rune, v uint) {
	m.keyIndexs[k] = len(m.Keys)
	m.Keys = append(m.Keys, k)
	m.Vals = append(m.Vals, v)
}
1054750
func (c *Scratch) Set(key string, value interface{}) string {
	c.mu.Lock()
	c.values[key] = value
	c.mu.Unlock()
	return ""
}
579991
func (c *Context) Set(key string, value interface{}) {
	c.Context = context.WithValue(c.Context, key, value)
}
810900
func (env *Env) Set(key, value string) {
	*env = append(*env, key+"="+value)
}
1329555
func (hm *SyncedHashMap) Set(key Hashable, value interface{}) {
	hm.Lock()
	defer hm.Unlock()
	(*hm).keys[key.Hash()] = key
	(*hm).values[key.Hash()] = value
}
71495
func (m *Map) Set(a, b interface{}) *Map {
	m.mapAToB[a] = b
	m.mapBToA[b] = a
	return m
}
121298
func (v Values) Set(key, value string) {
	v[key] = []string{value}
}
297233
func (m *ColonSeparatedMultimapStringString) Set(value string) error {
	if m.Multimap == nil {
		return fmt.Errorf("no target (nil pointer to map[string][]string)")
	}
	if !m.initialized || *m.Multimap == nil {
		// clear default values, or allocate if no existing map
		*m.Multimap = make(map[string][]string)
		m.initialized = true
	}
	for _, pair := range strings.Split(value, ",") {
		if len(pair) == 0 {
			continue
		}
		kv := strings.SplitN(pair, ":", 2)
		if len(kv) != 2 {
			return fmt.Errorf("malformed pair, expect string:string")
		}
		k := strings.TrimSpace(kv[0])
		v := strings.TrimSpace(kv[1])
		(*m.Multimap)[k] = append((*m.Multimap)[k], v)
	}
	return nil
}
848408
func (r *Redis) Set(key string, value interface{}) error {
	return r.Client.Set(key, convertToBytes(value), 0).Err()
}
1285703
func (s *Settings) Set(key, value string) {
	s.settings[key] = value
}
921464
func (s *StringValue) Set(val string) error {
	*s = StringValue(val)
	return nil
}
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()
}
901326
func (m *MapStringString) Set(value string) error {
	if m.Map == nil {
		return fmt.Errorf("no target (nil pointer to map[string]string)")
	}
	if !m.initialized || *m.Map == nil {
		// clear default values, or allocate if no existing map
		*m.Map = make(map[string]string)
		m.initialized = true
	}

	// account for comma-separated key-value pairs in a single invocation
	if !m.NoSplit {
		for _, s := range strings.Split(value, ",") {
			if len(s) == 0 {
				continue
			}
			arr := strings.SplitN(s, "=", 2)
			if len(arr) != 2 {
				return fmt.Errorf("malformed pair, expect string=string")
			}
			k := strings.TrimSpace(arr[0])
			v := strings.TrimSpace(arr[1])
			(*m.Map)[k] = v
		}
		return nil
	}

	// account for only one key-value pair in a single invocation
	arr := strings.SplitN(value, "=", 2)
	if len(arr) != 2 {
		return fmt.Errorf("malformed pair, expect string=string")
	}
	k := strings.TrimSpace(arr[0])
	v := strings.TrimSpace(arr[1])
	(*m.Map)[k] = v
	return nil

}
1056457
func (m *SyncMap) Set(key string, value interface{}) {
	shard := m.locate(key)
	shard.Lock()
	shard.items[key] = value
	shard.Unlock()
}
1061316
func (h *HashMap) Set(elementid, key, value string) (err error) {
	if h.name == nil {
		return ErrDoesNotExist
	}
	if strings.Contains(elementid, ":") {
		return ErrInvalidID
	}
	return (*bbolt.DB)(h.db).Update(func(tx *bbolt.Tx) error {
		bucket := tx.Bucket(h.name)
		if bucket == nil {
			return ErrBucketNotFound
		}
		// Store the key and value
		return bucket.Put([]byte(elementid+":"+key), []byte(value))
	})
}
4887
func (c *Controller) Set(key, val interface{}) {
	c.instance.StorageMu.Lock()
	c.instance.Storage[key] = val
	c.instance.StorageMu.Unlock()
}
59171
func (f *Values) Set(key, val string) {
	for i, v := range f.values {
		if v.Key == key {
			f.values[i].Value = val
			return
		}
	}

	f.Add(key, val)
}