1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-22 10:01:50 +03:00

Reuse buffer for constructing request.

This commit is contained in:
Vladimir Mihailenco
2012-08-14 18:20:22 +03:00
parent 625adac9ab
commit a2f5423658
8 changed files with 32 additions and 44 deletions

View File

@ -5,7 +5,7 @@ import (
)
type Req interface {
Req() []byte
Args() []string
ParseReply(ReadLiner) (interface{}, error)
SetErr(error)
Err() error
@ -28,8 +28,8 @@ func NewBaseReq(args ...string) *BaseReq {
}
}
func (r *BaseReq) Req() []byte {
return PackReq(r.args)
func (r *BaseReq) Args() []string {
return r.args
}
func (r *BaseReq) SetErr(err error) {