// Set sets function f in U under key. If the key already exists
// it is not overwritten.
338494
func (u U) Set(key string, f func() error, o interface{}) interface{} {
	if item, ok := u.u[key]; ok {
		return item.obj
	}
	u.u[key] = item{todo, f, o}
	return o
}
43580
func (u *UintValue) Set(v string) error {
	if u.v == nil {
		u.v = new(uint)
	}
	parsed, err := strconv.ParseUint(v, 0, 64)
	*(u.v) = (uint)(parsed)
	return err
}
184286
func (this *Response) Set(f string, v string) {
	if v == "" {
		this.RemoveHeader(f)
	} else {
		this.SetHeader(f, v)
	}
}
1171259
func (d *partialArray) set(key string, val *lazyNode) error {
	idx, err := strconv.Atoi(key)
	if err != nil {
		return err
	}
	(*d)[idx] = val
	return nil
}
812740
func Set(v interface{}, err error) (map[interface{}]bool, error) {
	if err != nil {
		return nil, err
	}

	vd, ok := v.(map[interface{}]bool)
	if ok {
		return vd, nil
	}

	return nil, newWrongTypeError(v, vd)
}
921464
func (s *StringValue) Set(val string) error {
	*s = StringValue(val)
	return nil
}
832249
func (m *lockingMap) Set(key string, val interface{}) {
	m.keyLocker.Lock(key)
	defer m.keyLocker.Unlock(key)

	m.lock.Lock()
	defer m.lock.Unlock()

	m.data[key] = val
}
366276
func (h *multiHandler) Set(key string, value interface{}, args ...interface{}) error {
	lengthArgs := len(args)
	if lengthArgs > 0 && !h.Args() {
		return cfg.ErrArgsNotSupported
	}

	for _, handler := range h.handlers {
		switch {
		case lengthArgs != 0 && handler.Args():
			if err := handler.Set(key, value, args...); err == nil {
				return nil
			}
		default:
			if err := handler.Set(key, value); err == nil {
				return nil
			}
		}

	}
	return cfg.ErrKeyNotSet
}
125734
func (v *String) Set(value string) {
	v.mu.Lock()
	v.s = value
	v.mu.Unlock()
}
286431
func (c *Strings) Set(value string) error {
	*c = append(*c, value)
	return nil
}
136521
func (s *SliceStrings) Set(str string) error {
	fargs := func(c rune) bool {
		return c == ',' || c == ';'
	}
	// get function
	slice := strings.FieldsFunc(str, fargs)
	*s = append(*s, slice...)
	return nil
}
605728
func (st *TxnState) Set(k kv.Key, v []byte) error {
	return st.buf.Set(k, v)
}
1066866
func (tt *Type) Set(v string) error {
	return targetTypeEnum.FlagSet(tt, v)
}
99591
func (p *Params) Set(key, value string) {
	if len(key) == 0 {
		return
	}
	if key[0] != ':' && key[0] != '*' {
		key = ":" + key
	}

	for i, v := range *p {
		if v.Name == key {
			(*p)[i].Value = value
			return
		}
	}

	*p = append(*p, param{key, value})
}
938243
func (s *StringValue) Set(v string) error {
	if s.v == nil {
		s.v = new(string)
	}
	*(s.v) = v
	return nil
}
1087312
func (km *KeyManager) Set(k Key, state bool) {
	km.mutex.Lock()

	ks := km.mapper[k]
	ks.set(state)
	km.mapper[k] = ks
	km.dirtmap[k] = k

	km.mutex.Unlock()
}
5010
func (o *UlimitOpt) Set(val string) error {
	l, err := units.ParseUlimit(val)
	if err != nil {
		return err
	}

	(*o.values)[l.Name] = l

	return nil
}