minor optimization

This commit is contained in:
Josh Baker 2017-01-13 08:04:33 -07:00
parent 37c8fd298f
commit e9fa4ff0b3
1 changed files with 2 additions and 2 deletions

View File

@ -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')