// Set will set the error of this structure to the provided
// value.
194235
func (e *Error) Set(err error) {
	e.lock.Lock()
	defer e.lock.Unlock()

	e.err = err
}
1284904
func (c *Conn) Set(key string, value []byte) error {
	code, body, err := c.doREST("PUT", key, value)
	if err != nil {
		return err
	}
	if code != 201 {
		return &Error{string(body), code}
	}

	return nil
}
323318
func (s *sliceOfStrings) Set(value string) error {
	parts := strings.Split(value, ",")
	if len(parts) == 0 {
		return fmt.Errorf("bad []string format: %s", value)
	}
	for _, entrypoint := range parts {
		*s = append(*s, entrypoint)
	}
	return nil
}
469862
func (n *Nodes) Set(node string) error {
	*n = append(*n, node)
	return nil
}
1300413
func (d *diffTypes) Set(value string) error {
	// Dedupe repeated elements.
	for _, t := range *d {
		if t == value {
			return nil
		}
	}
	*d = append(*d, value)
	return nil
}
680981
func (h *mapHandler) Set(key string, value interface{}, args ...interface{}) error {
	if len(args) != 0 {
		return cfg.ErrArgsNotSupported
	}
	h.values[key] = value
	return nil
}
362064
func (a *App) Set(m Model) error {
	app, ok := m.(*App)
	if !ok {
		return fmt.Errorf("given model %+v was not an *App", m)
	}
	*a = *app
	return nil
}
768265
func (h *hcode) set(code uint16, length uint16) {
	h.len = length
	h.code = code
}
684254
func (ia *IntValue) Set(s string) error {
	i, err := strconv.ParseInt(s, 10, 64)
	if err != nil {
		return err
	}
	*ia = IntValue(int(i))
	return nil
}
537590
func (self Object) Set(name string, value interface{}) error {
	{
		value, err := self.object.runtime.safeToValue(value)
		if err != nil {
			return err
		}
		err = catchPanic(func() {
			self.object.put(name, value, true)
		})
		return err
	}
}
98807
func (sa *StringsValue) Set(s string) error {
	*sa = append(*sa, s)
	return nil
}
393522
func (s *String) Set(val string) error {
	*s = String(val)
	return nil
}
599991
func (c *Certificates) Set(value string) error {
	certificates := strings.Split(value, ";")
	for _, certificate := range certificates {
		files := strings.Split(certificate, ",")
		if len(files) != 2 {
			return fmt.Errorf("bad certificates format: %s", value)
		}
		*c = append(*c, Certificate{
			CertFile: FileOrContent(files[0]),
			KeyFile:  FileOrContent(files[1]),
		})
	}
	return nil
}
121298
func (v Values) Set(key, value string) {
	v[key] = []string{value}
}
495252
func (s *StreamName) Set(value string) error {
	v := StreamName(value)
	if err := v.Validate(); err != nil {
		return err
	}
	*s = v
	return nil
}
905837
func (m *InstallMode) Set(value string) error {
	val := InstallMode(value)
	if err := ValidateInstallMode(val); err != nil {
		return err
	}
	*m = val
	return nil
}
516320
func (h Hash) Set(key string, value interface{}) Hash {
	h[key] = Value(valueToBytes(value))
	return h
}