// MultiValueMode specifies how the decay function should be calculated
// on a field that has multiple values.
// Valid modes are: min, max, avg, and sum.
421853
func (fn *GaussDecayFunction) MultiValueMode(mode string) *GaussDecayFunction {
	fn.multiValueMode = mode
	return fn
}
211598
func addValueFuncs(out map[string]reflect.Value, in FuncMap) {
	for name, fn := range in {
		v := reflect.ValueOf(fn)
		if v.Kind() != reflect.Func {
			panic("value for " + name + " not a function")
		}
		if !goodFunc(v.Type()) {
			panic(fmt.Errorf("can't install method/function %q with %d results", name, v.Type().NumOut()))
		}
		out[name] = v
	}
}
263985
func (c *Connector) MultiRemove(ctx context.Context, ei *dosa.EntityInfo, multiValues []map[string]dosa.FieldValue) ([]error, error) {
	return makeErrorSlice(len(multiValues), &dosa.ErrNotFound{}), nil
}
971646
func (p *pinner) PinWithMode(c cid.Cid, mode Mode) {
	p.lock.Lock()
	defer p.lock.Unlock()
	switch mode {
	case Recursive:
		p.recursePin.Add(c)
	case Direct:
		p.directPin.Add(c)
	}
}
1275271
func (s *StartAutomationExecutionInput) SetMode(v string) *StartAutomationExecutionInput {
	s.Mode = &v
	return s
}
36
func addValueToMap(keys []string, value interface{}, target map[string]interface{}) {
	next := target

	for i := range keys {
		// If we are on last key set or overwrite the val.
		if i == len(keys)-1 {
			next[keys[i]] = value
			break
		}

		if iface, ok := next[keys[i]]; ok {
			switch typed := iface.(type) {
			case map[string]interface{}:
				// If we already had a map inside, keep
				// stepping through.
				next = typed
			default:
				// If we didn't, then overwrite value
				// with a map and iterate with that.
				m := map[string]interface{}{}
				next[keys[i]] = m
				next = m
			}
			continue
		}

		// Otherwise, it wasn't present, so make it and step
		// into.
		m := map[string]interface{}{}
		next[keys[i]] = m
		next = m
	}
}
353710
func (s *FieldSort) SortMode(sortMode string) *FieldSort {
	s.sortMode = &sortMode
	return s
}
262400
func (s *S3Encryption) SetS3EncryptionMode(v string) *S3Encryption {
	s.S3EncryptionMode = &v
	return s
}
588968
func (s *GetHLSStreamingSessionURLInput) SetDiscontinuityMode(v string) *GetHLSStreamingSessionURLInput {
	s.DiscontinuityMode = &v
	return s
}
1149696
func PinMode(pin Pin, mode PinIOMode) error {
	gpio, e := GetGPIOModule()
	if e != nil {
		return e
	}

	return gpio.PinMode(pin, mode)
}
1287204
func (d *GrovePiDriver) PinMode(pin byte, mode string) error {
	var b []byte
	if mode == "output" {
		b = []byte{CommandPinMode, pin, 1, 0}
	} else {
		b = []byte{CommandPinMode, pin, 0, 0}
	}
	_, err := d.connection.Write(b)

	time.Sleep(2 * time.Millisecond)

	_, err = d.connection.ReadByte()

	return err
}
1092729
func (s *AccelerationSettings) SetMode(v string) *AccelerationSettings {
	s.Mode = &v
	return s
}
153549
func getMode(s string) (int, error) {
	switch {
	case strings.HasPrefix(s, "$argon2d"):
		return ModeArgon2d, nil
	case strings.HasPrefix(s, "$argon2id"):
		return ModeArgon2id, nil
	case strings.HasPrefix(s, "$argon2i"):
		return ModeArgon2i, nil
	default:
		return -1, ErrDecodingFail
	}
}
322326
func RawMode(t *Term) error {
	var a attr
	if err := termios.Tcgetattr(uintptr(t.fd), (*syscall.Termios)(&a)); err != nil {
		return err
	}
	termios.Cfmakeraw((*syscall.Termios)(&a))
	return termios.Tcsetattr(uintptr(t.fd), termios.TCSANOW, (*syscall.Termios)(&a))
}
1000794
func (t *Terminal) EchoMode(echo bool) error {
	if !echo {
		//t.lastState.Lflag &^= (sys.ECHO | sys.ECHOE | sys.ECHOK | sys.ECHONL)
		t.lastState.Lflag &^= sys.ECHO
	} else {
		//t.lastState.Lflag |= (sys.ECHO | sys.ECHOE | sys.ECHOK | sys.ECHONL)
		t.lastState.Lflag |= sys.ECHO
	}

	if err := sys.Setattr(t.fd, sys.TCSANOW, &t.lastState); err != nil {
		return os.NewSyscallError("sys.Setattr", err)
	}

	if echo {
		t.mode |= EchoMode
	} else {
		t.mode &^= EchoMode
	}
	return nil
}
127624
func (fn GaussDecayFunction) Decay(decay float64) GaussDecayFunction {
	fn.decay = &decay
	return fn
}
125119
func (t Type) MultipleInheritance() ([]string, bool) {
	if t.IsJSONType() {
		return nil, false
	}
	tStr := t.TypeString()
	if !strings.HasPrefix(tStr, "[") || !strings.HasSuffix(tStr, "]") {
		return nil, false
	}
	tStr = strings.TrimPrefix(strings.TrimSuffix(tStr, "]"), "[")
	splitted := strings.Split(tStr, ",")
	return splitted, len(splitted) > 1
}