// Set converts the CLI URL string into a url.URL.
186508
func (u *URLFlag) Set(val string) error {
	earl, err := url.Parse(val)
	if err == nil {
		*u = URLFlag(*earl)
	}
	return err
}
35975
func (s Uint64Slice) Set(v uint64) {
	for i := range s {
		s[i] = v
	}
}
1230329
func (s *StringFlag) Set(in string) error {
	s.string = &in
	return nil
}
1026136
func (self *Nameservers) Set(domainName string, nameservers []string) (*operation.OperationInfo, error) {
	var res map[string]interface{}
	params := []interface{}{self.Key, domainName, nameservers}
	if err := self.Call("domain.nameservers.set", params, &res); err != nil {
		return nil, err
	}
	return operation.ToOperationInfo(res), nil
}
1330266
func (s *Strings) Set(str string) error {
	for _, t := range strings.Split(str, ",") {
		*s = append(*s, t)
	}

	return nil
}
482277
func (i *Uint64Opt) Set(s string) error {
	v, err := strconv.ParseUint(s, 0, 64)
	i.value = &v
	return err
}
125734
func (v *String) Set(value string) {
	v.mu.Lock()
	v.s = value
	v.mu.Unlock()
}
929046
func (p *EnumParam) Set(s string) error {
	found := false
	for _, v := range p.values {
		if s == v {
			found = true
		}
	}
	if !found {
		return trace.Errorf(
			"value '%v' is not one of the allowed '%v'",
			s, strings.Join(p.values, ","),
		)
	}
	p.value = &s
	return nil
}
98807
func (sa *StringsValue) Set(s string) error {
	*sa = append(*sa, s)
	return nil
}
123533
func (p *ListParam) Set(s string) error {
	// this is to support setting from environment variables
	values := cstrings.Split(',', '\\', s)
	for _, v := range values {
		el := p.el.New()
		if err := el.Set(v); err != nil {
			return err
		}
		p.values = append(p.values, el)
	}
	return nil
}
94331
func (h Handler) Set(cmd common.SetRequest) error {
	_, err := h.doRequest(cmd, common.RequestSet)
	return err
}
319563
func (s *SyncString) Set(v string) {
	s.Lock()
	defer s.Unlock()
	s.string = v
}
623043
func (r *UnitsService) Set(unitName string, unit *Unit) *UnitsSetCall {
	c := &UnitsSetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.unitName = unitName
	c.unit = unit
	return c
}
1295966
func (a *NetworkAddresses) Set(s string) error {
	for _, t := range strings.Split(s, ",") {
		_, _, err := net.SplitHostPort(t)
		if err != nil {
			return err
		}

		*a = append(*a, t)
	}

	return nil
}
985941
func (u *URI) Set(value string) error {
	uri, err := NewURIFromAddress(value)
	if err != nil {
		return err
	}
	*u = *uri
	return nil
}
230915
func (nl *NetAddrList) Set(s string) error {
	v, err := ParseAddr(s)
	if err != nil {
		return err
	}

	*nl = append(*nl, *v)
	return nil
}
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

}