// Add adds a favorite to your favorites list.
760333
func (f *Favorites) Add(ctx context.Context, fav favorites.ToAdd) error {
	if f.disabled {
		return nil
	}
	if f.hasShutdown() {
		return data.ShutdownHappenedError{}
	}
	doAdd := true
	var err error
	// Retry until we get an error that wasn't related to someone
	// else's context being canceled.
	for doAdd {
		req, doSend := f.startOrJoinAddReq(ctx, fav)
		if doSend {
			return f.sendReq(ctx, req)
		}
		doAdd, err = f.waitOnReq(ctx, req)
	}
	return err
}
1034210
func (w *Watcher) Add(name string) error {
	w.mu.Lock()
	w.externalWatches[name] = true
	w.mu.Unlock()
	_, err := w.addWatch(name, noteAllEvents)
	return err
}
709014
func (e *Store) Add(id string, Config *Config) {
	e.Lock()
	e.byID[id] = Config
	e.Unlock()
}
413235
func (l *List) Add(value string) error {
	if !l.host.rawUTF8 {
		Encode(&value)
	}
	_, err := l.host.db.Exec("INSERT INTO "+l.table+" ("+listCol+") VALUES (?)", value)
	return err
}
343464
func (d *Dictionary) Add(key, value interface{}) {
	d.keys = append(d.keys, key)
	d.values = append(d.values, value)
}
5770
func (f *FakeCustomStore) Add(obj interface{}) error {
	if f.AddFunc != nil {
		return f.AddFunc(obj)
	}
	return nil
}
287483
func (t *TopK) Add(data []byte) *TopK {
	t.cms.Add(data)
	t.n++

	freq := t.cms.Count(data)
	if t.isTop(freq) {
		t.insert(data, freq)
	}

	return t
}
1240884
func (p *Plot) Add(r *vegeta.Result) error {
	s, ok := p.series[r.Attack]
	if !ok {
		s = newLabeledSeries(p.label)
		p.series[r.Attack] = s
	}
	return s.add(r)
}
583035
func (s *Set) Add(v string) bool {
	if pos := sort.SearchStrings(s.items, v); pos < len(s.items) {
		if s.items[pos] == v {
			return false
		}

		s.items = append(s.items, "")
		copy(s.items[pos+1:], s.items[pos:])
		s.items[pos] = v
	} else {
		s.items = append(s.items, v)
	}
	return true
}
1284894
func (l *List) Add(values ...interface{}) {
	l.values = append(l.values, values...)
}
1241664
func (l *List) Add(i int, n int64) {
	for len := len(l.tree); i < len; i |= i + 1 {
		l.tree[i] += n
	}
}
34443
func (lsel internalSelector) Add(reqs ...Requirement) Selector {
	var sel internalSelector
	for ix := range lsel {
		sel = append(sel, lsel[ix])
	}
	for _, r := range reqs {
		sel = append(sel, r)
	}
	sort.Sort(ByKey(sel))
	return sel
}
643316
func (s *UsersStore) Add(ctx context.Context, u *chronograf.User) (*chronograf.User, error) {
	return s.AddF(ctx, u)
}
918939
func (s MeasurementCardinalityStats) Add(other MeasurementCardinalityStats) {
	for name, v := range other {
		s[name] += v
	}
}
1272991
func (set *StringSet) Add(element string) bool {
	_, found := set.set[element]
	set.set[element] = true
	return !found
}
95378
func (m Map) Add(key, value string) {
	m[key] = append(m[key], value)
}
32559
func (kp *Keypairs) Add(keypairs ...ClaimedKeyPair) error {
	for _, k := range keypairs {
		kp.idIndex[*k.PublicKey.ID] = k

		orgID := *k.PublicKey.Body.OrgID
		_, ok := kp.keypairs[orgID]
		if !ok {
			kp.keypairs[orgID] = []ClaimedKeyPair{k}
			continue
		}

		kp.keypairs[orgID] = append(kp.keypairs[orgID], k)
	}

	return nil
}