// DoValue executes one Redis command and returns a single value.
328452
func (conn *Connection) DoValue(cmd string, args ...interface{}) (Value, error) {
	result, err := conn.Do(cmd, args...)
	if err != nil {
		return nil, err
	}
	return result.ValueAt(0)
}
658064
func (s *CommandFilter) SetValue(v string) *CommandFilter {
	s.Value = &v
	return s
}
1116157
func (r *response) errorValue() Value {
	errdata := []byte(r.err.Error())
	return Value(errdata)
}
640986
func (v *variable) intValue() int {
	i, err := strconv.Atoi(v.value)
	if err != nil {
		panic("unexpected value " + v.value + " for int ")
	}
	return i
}
358565
func (s *MapFilter) SetValue(v string) *MapFilter {
	s.Value = &v
	return s
}
1330603
func (ints Ints) AppendValue(dst []byte, quote int) []byte {
	if len(ints) == 0 {
		return dst
	}

	for _, v := range ints {
		dst = strconv.AppendInt(dst, v, 10)
		dst = append(dst, ',')
	}
	dst = dst[:len(dst)-1]
	return dst
}
903790
func readValue(ctx *cmd.Context, filename string) (string, error) {
	absFilename := ctx.AbsPath(filename)
	fi, err := os.Stat(absFilename)
	if err != nil {
		return "", errors.Errorf("cannot read option from file %q: %v", filename, err)
	}
	if fi.Size() > maxValueSize {
		return "", errors.Errorf("size of option file is larger than 5M")
	}
	content, err := ioutil.ReadFile(ctx.AbsPath(filename))
	if err != nil {
		return "", errors.Errorf("cannot read option from file %q: %v", filename, err)
	}
	return string(content), nil
}
596711
func parseValue(p ParseParams) (ast.Value, error) {
	var value ast.Value
	var sourceObj *source.Source
	switch src := p.Source.(type) {
	case *source.Source:
		sourceObj = src
	default:
		body, _ := p.Source.(string)
		sourceObj = source.NewSource(&source.Source{Body: []byte(body)})
	}
	parser, err := makeParser(sourceObj, p.Options)
	if err != nil {
		return value, err
	}
	value, err = parseValueLiteral(parser, false)
	if err != nil {
		return value, err
	}
	return value, nil
}
1039870
func (store *Store) doPeekValue(rtx *libredis.Tx, key string) (int64, time.Duration, error) {
	for i := 0; i < store.MaxRetry; i++ {
		count, ttl, err := peekValue(rtx, key)
		if err == nil {
			return count, ttl, nil
		}
	}
	return 0, 0, errors.New("retry limit exceeded")
}
1163339
func (s *AssociationExecutionTargetsFilter) SetValue(v string) *AssociationExecutionTargetsFilter {
	s.Value = &v
	return s
}
963393
func (s *MessageData) SetValue(v string) *MessageData {
	s.Value = &v
	return s
}
744758
func (s *ParameterHistory) SetValue(v string) *ParameterHistory {
	s.Value = &v
	return s
}
1327202
func AsValue(v interface{}) (out Value, ok bool) {
	if v == nil {
		return nil, true
	}
	switch v := v.(type) {
	case Value:
		out = v
	case string:
		out = String(v)
	case int:
		out = Int(v)
	case int8:
		out = Int(v)
	case int16:
		out = Int(v)
	case int32:
		out = Int(v)
	case int64:
		out = Int(v)
	case uint:
		out = Int(v)
	case uint8:
		out = Int(v)
	case uint16:
		out = Int(v)
	case uint32:
		out = Int(v)
	case uint64:
		out = Int(v)
	case float64:
		out = Float(v)
	case float32:
		out = Float(v)
	case bool:
		out = Bool(v)
	case time.Time:
		out = Time(v)
	default:
		return nil, false
	}
	return out, true
}
57720
func (s *MouthOpen) SetValue(v bool) *MouthOpen {
	s.Value = &v
	return s
}
1196955
func WithValue(e error, key, value interface{}) Error {
	if e == nil {
		return nil
	}
	return WrapSkipping(e, 1).WithValue(key, value)
}
584379
func (n *FilteredString) ParseValue(val string) {
	if val == "" {
		n.IsSet = false
		n.Value = ""
		return
	}

	n.IsSet = true

	switch val {
	case "null", "default":
		n.Value = ""
	default:
		n.Value = val
	}
}
556517
func (s *ReusableDelegationSetLimit) SetValue(v int64) *ReusableDelegationSetLimit {
	s.Value = &v
	return s
}