mirror of https://github.com/tidwall/tile38.git
minor optimization
This commit is contained in:
parent
37c8fd298f
commit
e9fa4ff0b3
|
@ -109,11 +109,11 @@ func (conn *DisqueEndpointConn) Send(msg string) error {
|
||||||
func buildRedisCommand(args []string) []byte {
|
func buildRedisCommand(args []string) []byte {
|
||||||
var cmd []byte
|
var cmd []byte
|
||||||
cmd = append(cmd, '*')
|
cmd = append(cmd, '*')
|
||||||
cmd = append(cmd, strconv.FormatInt(int64(len(args)), 10)...)
|
cmd = strconv.AppendInt(cmd, int64(len(args)), 10)
|
||||||
cmd = append(cmd, '\r', '\n')
|
cmd = append(cmd, '\r', '\n')
|
||||||
for _, arg := range args {
|
for _, arg := range args {
|
||||||
cmd = append(cmd, '$')
|
cmd = append(cmd, '$')
|
||||||
cmd = append(cmd, strconv.FormatInt(int64(len(arg)), 10)...)
|
cmd = strconv.AppendInt(cmd, int64(len(arg)), 10)
|
||||||
cmd = append(cmd, '\r', '\n')
|
cmd = append(cmd, '\r', '\n')
|
||||||
cmd = append(cmd, arg...)
|
cmd = append(cmd, arg...)
|
||||||
cmd = append(cmd, '\r', '\n')
|
cmd = append(cmd, '\r', '\n')
|
||||||
|
|
Loading…
Reference in New Issue