func NewRespFlattenedStrings(v interface{}) *Resp {
	fv := flatten(v)
	r := format(fv, true)
	return &r
}
NewRespFlattenedStrings is like NewResp except it looks through the given
value and converts any types (except slices/maps) into strings, and flatten any
embedded slices/maps into a single slice. This is useful because commands to
a redis server must be given as an array of bulk strings. If the argument
isn't already in a slice/map it will be wrapped so that it is written as a
Array of size one
package resp
import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"net"
	"reflect"
	"strconv"
	"strings"
)
var (
	delim    = []byte{'\r', '\n'}
	delimEnd = delim[len(delim)-1]
)
type RespType int
const (
	SimpleStr RespType = 1 << iota
	BulkStr
	IOErr
	AppErr
	Int
	Array
	Nil
	Str = SimpleStr | BulkStr
	Err = IOErr | AppErr
)
var (
	simpleStrPrefix = []byte{'+'}
	errPrefix       = []byte{'-'}
	intPrefix       = []byte{':'}
	bulkStrPrefix   = []byte{'$'}
	arrayPrefix     = []byte{'*'}
	nilFormatted    = []byte("$-1\r\n")
)
var (
	errBadType  = errors.New("wrong type")
	errParse    = errors.New("parse error")
	errNotStr   = errors.New("could not convert to string")
	errNotInt   = errors.New("could not convert to int")
	errNotArray = errors.New("could not convert to array")
)
type Resp struct {
	Typ RespType
	Val interface{}
	Err error
}
func NewResp(v interface{}) *Resp {
	r := format(v, false)
	return &r
}
func NewRespSimple(s string) *Resp {
	return &Resp{
		Typ: SimpleStr,
		Val: []byte(s),
	}
}