func (v Value) String() string {
	if v.typ == '$' {
		return string(v.str)
	}
	switch v.typ {
	case '+', '-':
		return string(v.str)
	case ':':
		return strconv.FormatInt(int64(v.integer), 10)
	case '*':
		return fmt.Sprintf("%v", v.array)
	}
	return ""
}
String converts Value to a string.
package resp
import (
	"bufio"
	"bytes"
	"errors"
	"fmt"
	"io"
	"strconv"
)
const bufsz = 4096
type Type byte
const (
	SimpleString Type = '+'
	Error        Type = '-'
	Integer      Type = ':'
	BulkString   Type = '$'
	Array        Type = '*'
)
func (t Type) String() string {
	switch t {
	default:
		return "Unknown"
	case '+':
		return "SimpleString"
	case '-':
		return "Error"
	case ':':
		return "Integer"
	case '$':
		return "BulkString"
	case '*':
		return "Array"
	}
}
type Value struct {
	typ     Type
	integer int
	str     []byte
	array   []Value
	null    bool
}
func (v Value) Integer() int {
	switch v.typ {
	default:
		n, _ := strconv.ParseInt(v.String(), 10, 64)
		return int(n)
	case ':':
		return v.integer
	}
}