// Set validates and updates the list of Runtimes
494297
func (o *RuntimeOpt) Set(val string) error {
	parts := strings.SplitN(val, "=", 2)
	if len(parts) != 2 {
		return fmt.Errorf("invalid runtime argument: %s", val)
	}

	parts[0] = strings.TrimSpace(parts[0])
	parts[1] = strings.TrimSpace(parts[1])
	if parts[0] == "" || parts[1] == "" {
		return fmt.Errorf("invalid runtime argument: %s", val)
	}

	parts[0] = strings.ToLower(parts[0])
	if parts[0] == o.stockRuntimeName {
		return fmt.Errorf("runtime name '%s' is reserved", o.stockRuntimeName)
	}

	if _, ok := (*o.values)[parts[0]]; ok {
		return fmt.Errorf("runtime '%s' was already defined", parts[0])
	}

	(*o.values)[parts[0]] = types.Runtime{Path: parts[1]}

	return nil
}
813885
func (gr *GenericRecord) Set(name string, value interface{}) {
	gr.fields[name] = value
}
653950
func (this *Server) Set(n string, v ...string) string {
	if len(v) == 0 {
		return this.settings[n]
	}
	this.settings[n] = v[0]
	return v[0]
}
247174
func (d *DurationValue) Set(v string) error {
	if d.v == nil {
		d.v = new(time.Duration)
	}
	var err error
	*(d.v), err = time.ParseDuration(v)
	return err
}
93301
func (f *stateFlag) Set(s string) error {
	i, err := common.GetState(s)
	if err != nil {
		return errors.Reason("value must be a valid state returned by get-states").Err()
	}
	*f = stateFlag(i)
	return nil
}
264038
func (eng *Engine) Set(name string, value interface{}, tags ...Tag) {
	eng.measure(time.Now(), name, value, Gauge, tags...)
}
125734
func (v *String) Set(value string) {
	v.mu.Lock()
	v.s = value
	v.mu.Unlock()
}
326332
func (gd *GaugeDuration) Set(value time.Duration) {
	gd.i.Set(value)
}
206732
func (ts *TimeFlag) Set(value string) error {
	t, err := ParseTime(value)
	*ts = TimeFlag(t)
	return err
}
162199
func (l *RangeList) Set(value string) error {
	newRangeList, err := ParseRangeList(value)
	if err != nil {
		return err
	}
	*l = *newRangeList
	return nil
}
35975
func (s Uint64Slice) Set(v uint64) {
	for i := range s {
		s[i] = v
	}
}
393522
func (s *String) Set(val string) error {
	*s = String(val)
	return nil
}
733248
func (s *FunctionConfiguration) SetRuntime(v string) *FunctionConfiguration {
	s.Runtime = &v
	return s
}
457398
func (f *Strings) Set(i string) error {
	*f = append(*f, i)
	return nil
}
137671
func (c *Client) Set(name string, value string, tags []string, rate float64) error {
	return c.send(name, value, setSuffix, tags, rate)
}
136318
func (t *SecondaryTree) Set(k ServiceInfo, v *FinalizerList) {
	//dbg("--- PRE Set(%v, %v)\n%s", k, v, t.dump())
	//defer func() {
	//	dbg("--- POST\n%s\n====\n", t.dump())
	//}()

	pi := -1
	var p *x2
	q := t.r
	if q == nil {
		z := t.insert(btDPool2.Get().(*d2), 0, k, v)
		t.r, t.first, t.last = z, z, z
		return
	}

	for {
		i, ok := t.find(q, k)
		if ok {
			switch x := q.(type) {
			case *x2:
				if x.c > 2*kx2 {
					x, i = t.splitX(p, x, pi, i)
				}
				pi = i + 1
				p = x
				q = x.x[i+1].ch
				continue
			case *d2:
				x.d[i].v = v
			}
			return
		}

		switch x := q.(type) {
		case *x2:
			if x.c > 2*kx2 {
				x, i = t.splitX(p, x, pi, i)
			}
			pi = i
			p = x
			q = x.x[i].ch
		case *d2:
			switch {
			case x.c < 2*kd2:
				t.insert(x, i, k, v)
			default:
				t.overflow(p, x, pi, i, k, v)
			}
			return
		}
	}
}
1024149
func (c *LayeredCache) Set(primary, secondary string, value interface{}, duration time.Duration) {
	c.set(primary, secondary, value, duration)
}