func intToByteArr(a int) []byte {
	buf := make([]byte, 0)
	return strconv.AppendInt(buf, int64(a), 10)
}
intToByteArr convert int to byte array
package main
import (
	"bufio"
	"errors"
	"fmt"
	"math"
	"reflect"
	"strconv"
	"strings"
	"time"
)
const (
	askPrefix         = "ASK "
	movedPrefix       = "MOVED "
	clusterDownPrefix = "CLUSTERDOWN "
	busyPrefix        = "BUSY "
	noscriptPrefix    = "NOSCRIPT "
	defaultHost         = "localhost"
	defaultPort         = 6379
	defaultSentinelPort = 26379
	defaultTimeout      = 5 * time.Second
	defaultDatabase     = 2 * time.Second
	dollarByte        = '$'
	asteriskByte      = '*'
	plusByte          = '+'
	minusByte         = '-'
	colonByte         = ':'
	notApplicableByte = '0'
	sentinelMasters             = "masters"
	sentinelGetMasterAddrByName = "get-master-addr-by-name"
	sentinelReset               = "reset"
	sentinelSlaves              = "slaves"
	sentinelFailOver            = "failover"
	sentinelMonitor             = "monitor"
	sentinelRemove              = "remove"
	sentinelSet                 = "set"
	clusterNodes            = "nodes"
	clusterMeet             = "meet"
	clusterReset            = "reset"
	clusterAddSlots         = "addslots"
	clusterDelSlots         = "delslots"
	clusterInfo             = "info"
	clusterGetKeysInSlot    = "getkeysinslot"
	clusterSetSlot          = "setslot"
	clusterSetSlotNode      = "node"
	clusterSetSlotMigrating = "migrating"
	clusterSetSlotImporting = "importing"
	clusterSetSlotStable    = "stable"
	clusterForget           = "forget"
	clusterFlushSlot        = "flushslots"
	clusterKeySlot          = "keyslot"
	clusterCountKeyInSlot   = "countkeysinslot"
	clusterSaveConfig       = "saveconfig"
	clusterReplicate        = "replicate"
	clusterSlaves           = "slaves"
	clusterFailOver         = "failover"
	clusterSlots            = "slots"
	pubSubChannels          = "channels"
	pubSubNumSub            = "numsub"
	pubSubNumPat            = "numpat"
)