// Add adds bundle to the keyset.  If a key already exists, it
// will be ignored.
975766
func (k *keyset) Add(bundle *libkb.PGPKeyBundle) {
	kid := bundle.GetKID()
	if _, ok := k.keys[kid]; ok {
		return
	}
	k.keys[kid] = bundle
	k.index = append(k.index, kid)
}
537693
func (i IntCounter) Add(key int) (changed bool) {
	value, exists := i[key]
	if !exists {
		changed = true
	}
	i[key] = value + 1
	return changed
}
1224441
func (t *ObjectTree) Add(o Interface) (val interface{}, isDupe bool) {
	return t.Tree.Add(o)
}
71266
func (a *Aliases) Add(alias, mac, iface string) error {
	a.mtx.Lock()
	defer a.mtx.Unlock()

	// Create a buffer to store the encoded MAC, interface pair.
	buf, err := EncodeFromMacIface(mac, iface)
	if err != nil {
		return err
	}

	// We don't have to worry about the key existing, as we will update it
	// provided it exists.
	return a.db.Update(func(tx *bolt.Tx) error {
		bucket := tx.Bucket([]byte(bucketName))
		return bucket.Put([]byte(alias), buf.Bytes())
	})
}
494463
func (b *Builder) Add(args ...string) error {
	for _, a := range args {
		if err := b.add(a); err != nil {
			return errwrap.Wrapf(fmt.Sprintf("invalid key/value pair %q: {{err}}", a), err)
		}
	}

	return nil
}
1296305
func (t *Trie) Add(key string, meta interface{}) *Node {
	t.mu.Lock()
	defer t.mu.Unlock()

	t.size++
	runes := []rune(key)
	bitmask := maskruneslice(runes)
	node := t.root
	node.mask |= bitmask
	for i := range runes {
		r := runes[i]
		bitmask = maskruneslice(runes[i:])
		if n, ok := node.children[r]; ok {
			node = n
			node.mask |= bitmask
		} else {
			node = node.NewChild(r, bitmask, nil, false)
		}
	}
	node = node.NewChild(nul, 0, meta, true)
	return node
}
649307
func (s *podSet) Add(pod *v1.Pod) {
	s.mutex.Lock()
	defer s.mutex.Unlock()
	s.set[podId(pod)] = struct{}{}
}
967399
func (r *keyring) Add(priv interface{}, cert *ssh.Certificate, comment string) error {
	r.mu.Lock()
	defer r.mu.Unlock()
	if r.locked {
		return errLocked
	}
	signer, err := ssh.NewSignerFromKey(priv)

	if err != nil {
		return err
	}

	if cert != nil {
		signer, err = ssh.NewCertSigner(cert, signer)
		if err != nil {
			return err
		}
	}

	r.keys = append(r.keys, privKey{signer, comment})

	return nil
}
978082
func (bs *ByString) Add(key string, inc int) int {
	if *bs == nil {
		*bs = make(map[string]int)
	}
	v := (*bs)[key] + inc
	(*bs)[key] = v
	return v
}
451659
func (b *Base) Add(key string, value interface{}) Serializer {
	return b.AddIf(alwaysTrue, key, value)
}
740827
func (cs callSet) Add(call *Call) {
	key := callSetKey{call.receiver, call.method}
	m := cs.expected
	if call.exhausted() {
		m = cs.exhausted
	}
	m[key] = append(m[key], call)
}
1086050
func (s *stringSet) Add(vs ...string) {
	for _, v := range vs {
		s.values[v] = struct{}{}
	}
}
758365
func (h Header) Add(key, value string) {
	key = textproto.CanonicalMIMEHeaderKey(key)
	h[key] = append(h[key], value)
}
95378
func (m Map) Add(key, value string) {
	m[key] = append(m[key], value)
}
1277780
func (g *Mutable) Add(v, w int) {
	g.AddCost(v, w, 0)
}
840897
func (s *RedisSetStore) Add(key string, values ...string) error {
	if !strings.HasPrefix(key, s.prefix) {
		key = s.prefix + key
	}
	valuesI := make([]interface{}, len(values))
	for i, v := range values {
		valuesI[i] = v
	}
	return s.client.SAdd(key, valuesI...).Err()
}
900133
func (t *PairTree) Add(o Pair) (val *Pair, isDupe bool) {
	v, d := t.ObjectTree.Add(o)
	if v != nil {
		x := v.(Pair)
		return &x, d
	}
	return nil, d
}