redis-shake工具
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
418 B

package client
import (
"bytes"
"github.com/alibaba/RedisShake/internal/client/proto"
"github.com/alibaba/RedisShake/internal/log"
)
func EncodeArgv(argv []string, buf *bytes.Buffer) {
writer := proto.NewWriter(buf)
argvInterface := make([]interface{}, len(argv))
for inx, item := range argv {
argvInterface[inx] = item
}
err := writer.WriteArgs(argvInterface)
if err != nil {
log.PanicError(err)
}
}