// set sets the code and length of an hcode.
768265
func (h *hcode) set(code uint16, length uint16) {
	h.len = length
	h.code = code
}
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
}
309132
func (d *inMemoryDB) Set(key string, val []byte) error {
	d.lck.Lock()
	defer d.lck.Unlock()
	d.m[key] = val
	return nil
}
903422
func (d *Duration) Set(s string) error {
	var err error
	*d, err = ParseDuration(s)
	return err
}
120770
func (f *StructField) Set(v interface{}, seps ...rune) error {
	return Set(f.value, v, seps...)
}
121298
func (v Values) Set(key, value string) {
	v[key] = []string{value}
}
975170
func (r *MemoryNoTS) Set(key string, value interface{}) error {
	r.items[key] = value
	return nil
}
457398
func (f *Strings) Set(i string) error {
	*f = append(*f, i)
	return nil
}
98807
func (sa *StringsValue) Set(s string) error {
	*sa = append(*sa, s)
	return nil
}
469698
func (h Header) Set(key, value string) {
	h[textproto.CanonicalMIMEHeaderKey(key)] = []string{value}
}
1253138
func (b *BytesRefBuilder) Set(offset int, v byte) {
	b.ref.Bytes[offset] = v
}
517021
func (f *int32Flag) Set(s string) error {
	i, err := strconv.ParseInt(s, 10, 32)
	if err != nil {
		return errors.Reason("values must be 32-bit integers").Err()
	}
	*f = int32Flag(i)
	return nil
}
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
}
901630
func (sa *StringValue) Set(s string) error {
	*sa = StringValue(s)
	return nil
}
1369810
func (c *Cache) Set(key string, value interface{}, size int64) {
	c.Lock()
	defer c.Unlock()

	var it *Item
	elem, ok := c.m[key]
	if ok {
		// Element exists, push it to front,
		// and then update value etc.
		it = elem.Value.(*Item)
		c.size -= it.Size
		c.l.MoveToFront(elem)
	} else {
		// Insert new element.
		it = &Item{Key: key}
		elem = c.l.PushFront(it)
		c.m[key] = elem
	}
	// Set or update item content.
	it.Value = value
	it.Size = size
	if it.Size < 0 {
		panic("cache: value has negative size")
	}
	it.ModTime = time.Now()
	it.AccessTime = it.ModTime

	// Update cache size.
	if it.Size >= math.MaxInt64-c.size {
		panic("cache: value size is too big")
	}
	c.size += it.Size

	c.enforceCapacity()
}
106434
func (h Handler) Set(cmd common.SetRequest) error {
	return h.handleSetCommon(cmd, common.RequestSet)
}
263357
func (i *StringSlice) Set(value string) error {
	*i = append(*i, value)
	return nil
}