// Set sets the value of the MemSwapBytes by passing a string
161459
func (m *MemSwapBytes) Set(value string) error {
	if value == "-1" {
		*m = MemSwapBytes(-1)
		return nil
	}
	val, err := units.RAMInBytes(value)
	*m = MemSwapBytes(val)
	return err
}
15349
func (r *MemoryTTL) Set(key string, value interface{}) error {
	r.Lock()
	defer r.Unlock()

	r.cache.Set(key, value)
	r.setAts[key] = time.Now()
	return nil
}
118289
func (s Sparse) Set(i int) {
	s[int(uint(i)>>ptrShift)] |= 1 << (uint(i) & ptrModMask)
}
1191585
func (f *int64SliceFlag) Set(val string) error {
	i, err := strconv.ParseInt(val, 10, 64)
	if err != nil {
		return errors.Reason("values must be 64-bit integers").Err()
	}
	*f = append(*f, i)
	return nil
}
1230329
func (s *StringFlag) Set(in string) error {
	s.string = &in
	return nil
}
145598
func set(m []uint8, n uint64) {
	idx, mask := n>>idxShift, n&idxMask
	m[idx] |= 1 << mask
}
766377
func (c *InMemoryCache) Set(_ context.Context, key Key, value Thunk) {
	c.items.Store(key.String(), value)
}
1374659
func (m *MemDB) Set(key, value []byte, o *db.WriteOptions) error {
	m.mutex.Lock()
	defer m.mutex.Unlock()
	// Find the node, and its predecessors at all heights.
	var prev [maxHeight]int
	n, exactMatch := m.findNode(key, &prev)
	if exactMatch {
		m.nodeData[n+fVal] = m.save(value)
		return nil
	}
	// Choose the new node's height, branching with 25% probability.
	h := 1
	for h < maxHeight && rand.Intn(4) == 0 {
		h++
	}
	// Raise the skiplist's height to the node's height, if necessary.
	if m.height < h {
		for i := m.height; i < h; i++ {
			prev[i] = headNode
		}
		m.height = h
	}
	// Insert the new node.
	var x [fNxt + maxHeight]int
	n1 := len(m.nodeData)
	x[fKey] = m.save(key)
	x[fVal] = m.save(value)
	for i := 0; i < h; i++ {
		j := prev[i] + fNxt + i
		x[fNxt+i] = m.nodeData[j]
		m.nodeData[j] = n1
	}
	m.nodeData = append(m.nodeData, x[:fNxt+h]...)
	return nil
}
543901
func (b Bitmap) Set(idx uint) {
	bucket := idx >> 3
	mask := byte(1 << (idx & 7))
	b[bucket] |= mask
}
482964
func (me *TxsdRunTypeSequenceSequenceDataBlockSequenceFilesSequenceFileChecksumMethod) Set(s string) {
	(*xsdt.String)(me).Set(s)
}
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

}
1264458
func (i *Int64Value) Set(s string) error {
	v, err := strconv.ParseInt(s, 0, 64)
	*i = Int64Value(v)
	return err
}
278253
func (m *Map) Set(k []byte, v MapValue) {
	m.set(k, v, mapKeyOptions{
		copyKey:     true,
		finalizeKey: m.finalize != nil,
	})
}
823154
func Set(value reflect.Value, v interface{}, seps ...rune) error {
	if !value.CanSet() {
		return errCannotSet
	}

	if s, ok := v.(string); ok {
		return UnmarshalValue(value, s, seps...)
	}

	val := reflect.ValueOf(v)
	if value.Kind() != val.Kind() {
		// The value was converted.
		v, err := convert(val, value)
		if err != nil {
			return err
		}
		val = v
	}
	value.Set(val)
	return nil
}
1123908
func (s Int64Slice) Set(v int64) {
	for i := range s {
		s[i] = v
	}
}
538931
func (me *Int) Set(s string) {
	v, _ := strconv.ParseInt(s, 0, 32)
	*me = Int(v)
}
286431
func (c *Strings) Set(value string) error {
	*c = append(*c, value)
	return nil
}