1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00

Review API.

This commit is contained in:
Vladimir Mihailenco
2012-08-17 21:36:48 +03:00
parent df1b8a3f5c
commit 11e1783560
10 changed files with 818 additions and 621 deletions

View File

@ -57,12 +57,12 @@ type BaseClient struct {
}
func (c *BaseClient) WriteReq(conn *Conn, reqs ...Req) error {
conn.ReqBuf = conn.ReqBuf[:0]
buf := make([]byte, 0, 1000)
for _, req := range reqs {
conn.ReqBuf = AppendReq(conn.ReqBuf, req.Args())
buf = appendReq(buf, req.Args())
}
_, err := conn.RW.Write(conn.ReqBuf)
_, err := conn.RW.Write(buf)
return err
}