// AddToWriteSet adds a key and value to the write-set
323277
func (b *RWSetBuilder) AddToWriteSet(ns string, key string, value []byte) {
	nsPubRwBuilder := b.getOrCreateNsPubRwBuilder(ns)
	nsPubRwBuilder.writeMap[key] = newKVWrite(key, value)
}
344500
func (g *Generator) AddSolarisAnet(anet rspec.SolarisAnet) {
	g.initConfigSolaris()
	g.Config.Solaris.Anet = append(g.Config.Solaris.Anet, anet)
}
981855
func (m *SetRollPitchYawThrust) Pack() []byte {
	data := new(bytes.Buffer)
	binary.Write(data, binary.LittleEndian, m.ROLL)
	binary.Write(data, binary.LittleEndian, m.PITCH)
	binary.Write(data, binary.LittleEndian, m.YAW)
	binary.Write(data, binary.LittleEndian, m.THRUST)
	binary.Write(data, binary.LittleEndian, m.TARGET_SYSTEM)
	binary.Write(data, binary.LittleEndian, m.TARGET_COMPONENT)
	return data.Bytes()
}
35975
func (s Uint64Slice) Set(v uint64) {
	for i := range s {
		s[i] = v
	}
}
984348
func FSTypeToStringSet(fsTypes []policy.FSType) sets.String {
	set := sets.NewString()
	for _, v := range fsTypes {
		set.Insert(string(v))
	}
	return set
}
957435
func (me *TxsdSequencingDirectivesTypeAllSampleDemuxDirective) Set(s string) {
	(*xsdt.String)(me).Set(s)
}
459215
func (s StringSet) AddAll(newValues []string) {
	for _, newValue := range newValues {
		s[newValue] = struct{}{}
	}
}
959354
func AddStylesheet(url string) {
	link := global.Get("document").Call("createElement", "link")
	link.Set("rel", "stylesheet")
	link.Set("href", url)
	global.Get("document").Get("head").Call("appendChild", link)
}
626583
func (set LiteralFieldSet) Add(i LiteralField) bool {
	_, found := set[i]
	set[i] = struct{}{}
	return !found //False if it existed already
}
811674
func NewTemplateSet(name string, entry string, tFile string, otherFiles ...string) *TemplateSet {
	fileList := make([]string, 0, 1+len(otherFiles))
	fileList = append(fileList, tFile)
	for _, f := range otherFiles {
		fileList = append(fileList, f)
	}
	return &TemplateSet{
		name:     name,
		fileList: fileList,
		entry:    entry,
	}
}
1129824
func (s StringSet) AddSet(newValues StringSet) {
	for newValue, _ := range newValues {
		s[newValue] = struct{}{}
	}
}
15661
func (p *Pool) addToPoolSet() error {
	conn := redisPool.Get()
	defer conn.Close()
	p.RLock()
	thisId := p.id
	p.RUnlock()
	if _, err := conn.Do("SADD", Keys.ActivePools, thisId); err != nil {
		return err
	}
	return nil
}
214108
func NewSet(vs ...interface{}) Set {
	s := &set{make(map[interface{}]struct{})}
	s.Add(vs...)
	return s
}
1086050
func (s *stringSet) Add(vs ...string) {
	for _, v := range vs {
		s.values[v] = struct{}{}
	}
}
323529
func (gs *groupSet) AddSet(gs2 *groupSet) {
	// acquire locks in order
	p1 := uintptr(unsafe.Pointer(gs))
	p2 := uintptr(unsafe.Pointer(gs2))
	switch {
	case p1 < p2:
		gs.Lock()
		gs2.Lock()
		defer gs.Unlock()
		defer gs2.Unlock()
	case p1 > p2:
		gs2.Lock()
		gs.Lock()
		defer gs2.Unlock()
		defer gs.Unlock()
	default:
		return // they're the same!
	}

	for g := range gs2.m {
		gs.m[g] = struct{}{}
	}
}
351413
func (w *Writer) AddSeries(ref uint64, lset labels.Labels, chunks ...chunks.Meta) error {
	if err := w.ensureStage(idxStageSeries); err != nil {
		return err
	}
	if labels.Compare(lset, w.lastSeries) <= 0 {
		return errors.Errorf("out-of-order series added with label set %q", lset)
	}

	if _, ok := w.seriesOffsets[ref]; ok {
		return errors.Errorf("series with reference %d already added", ref)
	}
	// We add padding to 16 bytes to increase the addressable space we get through 4 byte
	// series references.
	if err := w.addPadding(16); err != nil {
		return errors.Errorf("failed to write padding bytes: %v", err)
	}

	if w.pos%16 != 0 {
		return errors.Errorf("series write not 16-byte aligned at %d", w.pos)
	}
	w.seriesOffsets[ref] = w.pos / 16

	w.buf2.Reset()
	w.buf2.PutUvarint(len(lset))

	for _, l := range lset {
		// here we have an index for the symbol file if v2, otherwise it's an offset
		index, ok := w.symbols[l.Name]
		if !ok {
			return errors.Errorf("symbol entry for %q does not exist", l.Name)
		}
		w.buf2.PutUvarint32(index)

		index, ok = w.symbols[l.Value]
		if !ok {
			return errors.Errorf("symbol entry for %q does not exist", l.Value)
		}
		w.buf2.PutUvarint32(index)
	}

	w.buf2.PutUvarint(len(chunks))

	if len(chunks) > 0 {
		c := chunks[0]
		w.buf2.PutVarint64(c.MinTime)
		w.buf2.PutUvarint64(uint64(c.MaxTime - c.MinTime))
		w.buf2.PutUvarint64(c.Ref)
		t0 := c.MaxTime
		ref0 := int64(c.Ref)

		for _, c := range chunks[1:] {
			w.buf2.PutUvarint64(uint64(c.MinTime - t0))
			w.buf2.PutUvarint64(uint64(c.MaxTime - c.MinTime))
			t0 = c.MaxTime

			w.buf2.PutVarint64(int64(c.Ref) - ref0)
			ref0 = int64(c.Ref)
		}
	}

	w.buf1.Reset()
	w.buf1.PutUvarint(w.buf2.Len())

	w.buf2.PutHash(w.crc32)

	if err := w.write(w.buf1.Get(), w.buf2.Get()); err != nil {
		return errors.Wrap(err, "write series data")
	}

	w.lastSeries = append(w.lastSeries[:0], lset...)

	return nil
}
285851
func (m *concurrentMap) Set(k string, v Word) {
	m.Lock()
	m.words[k] = v
	m.Unlock()
}