1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

Reuse write buffer.

This commit is contained in:
Vladimir Mihailenco
2014-07-13 15:07:37 +03:00
parent aff229a228
commit 97039c229c
2 changed files with 3 additions and 1 deletions

View File

@ -14,7 +14,7 @@ type baseClient struct {
}
func (c *baseClient) writeCmd(cn *conn, cmds ...Cmder) error {
buf := make([]byte, 0, 64)
buf := cn.buf[:0]
for _, cmd := range cmds {
buf = appendArgs(buf, cmd.args())
}