// Add adds addresses to an app's whitelist.
426780
func Add(c *deis.Client, appID string, addresses []string) (api.Whitelist, error) {
	u := fmt.Sprintf("/v2/apps/%s/whitelist/", appID)

	req := api.Whitelist{Addresses: addresses}
	body, err := json.Marshal(req)
	if err != nil {
		return api.Whitelist{}, err
	}
	res, reqErr := c.Request("POST", u, body)
	if reqErr != nil && !deis.IsErrAPIMismatch(reqErr) {
		return api.Whitelist{}, reqErr
	}
	defer res.Body.Close()

	d := api.Whitelist{}
	if err = json.NewDecoder(res.Body).Decode(&d); err != nil {
		return api.Whitelist{}, err
	}

	return d, reqErr
}
389313
func (l builtList) Add(name string) builtList {
	if l == nil {
		return builtList{name: 0}
	}
	l[name] = len(l)
	return l
}
172620
func (c *Client) Add(data interface{}) error {
	c.ensureTransmission()
	c.ensureBuilder()
	return c.builder.Add(data)
}
553965
func (c *linkAddrCache) add(k tcpip.FullAddress, v tcpip.LinkAddress) {
	c.mu.Lock()
	defer c.mu.Unlock()

	entry, ok := c.cache[k]
	if ok {
		s := entry.state()
		if s != expired && entry.linkAddr == v {
			// Disregard repeated calls.
			return
		}
		// Check if entry is waiting for address resolution.
		if s == incomplete {
			entry.linkAddr = v
		} else {
			// Otherwise create a new entry to replace it.
			entry = c.makeAndAddEntry(k, v)
		}
	} else {
		entry = c.makeAndAddEntry(k, v)
	}

	entry.changeState(ready)
}
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
}
511422
func (c *Client) Add(vb uint16, key string, flags int, exp int,
	body []byte) (*gomemcached.MCResponse, error) {
	return c.store(gomemcached.ADD, vb, key, flags, exp, body)
}
1177588
func (l *List) Add(c Capability, values ...string) error {
	if err := l.validate(c, values); err != nil {
		return err
	}

	if !l.Supports(c) {
		l.m[c] = &entry{Name: c}
		l.sort = append(l.sort, c.String())
	}

	if len(values) == 0 {
		return nil
	}

	if known[c] && !multipleArgument[c] && len(l.m[c].Values) > 0 {
		return ErrMultipleArguments
	}

	l.m[c].Values = append(l.m[c].Values, values...)
	return nil
}
46636
func (s *IPSet) Add(entry string, timeout int) error {
	out, err := exec.Command(ipsetPath, "add", s.Name, entry, "timeout", strconv.Itoa(timeout), "-exist").CombinedOutput()
	if err != nil {
		return fmt.Errorf("error adding entry %s: %v (%s)", entry, err, out)
	}
	return nil
}
544955
func (b *SampleFJSONBuilder) Add(info *SampleFPropertyInfo) *SampleFJSONBuilder {
	b._properties[info.fieldName] = info
	return b
}
267757
func (i *Installer) Add(remoteFilesZip ...string) {
	i.mu.Lock()
	i.RemoteFiles = append(i.RemoteFiles, remoteFilesZip...)
	i.mu.Unlock()
}
1264959
func (p *ErrorList) Add(pos token.Position, msg string) {
	*p = append(*p, &Error{pos, msg})
}
455315
func (as *accountSet) add(addr common.Address) {
	as.accounts[addr] = struct{}{}
	as.cache = nil
}
563037
func (b *FugaJSONBuilder) Add(info *FugaPropertyInfo) *FugaJSONBuilder {
	b._properties[info.fieldName] = info
	return b
}
707276
func (au *LocalAuthenticator) Add(k, v string) {
	au.mux.Lock()
	defer au.mux.Unlock()
	if au.kvs == nil {
		au.kvs = make(map[string]string)
	}
	au.kvs[k] = v
}
1232834
func (s *ServiceCache) Add(e *common.Service, id string, data interface{}, local bool) error {
	s.Lock()
	defer s.Unlock()

	record := &entry{
		ports: e.Ports,
		data:  data,
		id:    id,
	}
	if err := s.addPorts(e, record, local); err != nil {
		return err
	}

	if err := s.addHostService(e, record, local); err != nil {
		return err
	}

	return s.addIPService(e, record, local)
}
713373
func (z *zones) Add(addZone dnsprovider.Zone) (dnsprovider.Zone, error) {
	zoneToAdd, ok := addZone.(*zone)
	if !ok {
		return nil, fmt.Errorf("unexpected zone type: %T", addZone)
	}

	zoneInfo, err := z.dnsView.AddZone(zoneToAdd.zoneInfo)
	if err != nil {
		return nil, err
	}
	return &zone{dnsView: z.dnsView, zoneInfo: *zoneInfo}, nil
}
1274403
func (f *SecureStack) Add(fx interface{}) int {
	f.lock.Lock()
	ind := len(f.listeners)
	f.listeners = append(f.listeners, fx)
	f.lock.Unlock()
	return ind
}