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

Embed Cmdable into StatefulCmdable

This commit is contained in:
Vladimir Mihailenco
2017-05-25 13:38:04 +03:00
parent 368f0ea0ba
commit 7e8890b644
7 changed files with 23 additions and 23 deletions

View File

@ -294,7 +294,7 @@ func newClient(opt *Options, pool pool.Pooler) *Client {
connPool: pool,
},
}
client.cmdable.process = client.Process
client.setProcessor(client.Process)
return &client
}
@ -307,7 +307,7 @@ func NewClient(opt *Options) *Client {
func (c *Client) copy() *Client {
c2 := new(Client)
*c2 = *c
c2.cmdable.process = c2.Process
c2.setProcessor(c2.Process)
return c2
}
@ -332,8 +332,7 @@ func (c *Client) Pipeline() Pipeliner {
pipe := Pipeline{
exec: c.pipelineExecer(c.pipelineProcessCmds),
}
pipe.cmdable.process = pipe.Process
pipe.statefulCmdable.process = pipe.Process
pipe.setProcessor(pipe.Process)
return &pipe
}
@ -346,8 +345,7 @@ func (c *Client) TxPipeline() Pipeliner {
pipe := Pipeline{
exec: c.pipelineExecer(c.txPipelineProcessCmds),
}
pipe.cmdable.process = pipe.Process
pipe.statefulCmdable.process = pipe.Process
pipe.setProcessor(pipe.Process)
return &pipe
}