Merge pull request #558 from felipejfc/master

Client TxPipeline method should also return a Pipeliner
This commit is contained in:
Vladimir Mihailenco 2017-05-03 17:13:54 +03:00 committed by GitHub
commit 0232c510cb
2 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ var _ = Describe("pipelining", func() {
Describe("TxPipeline", func() {
BeforeEach(func() {
pipe = client.TxPipeline()
pipe = client.TxPipeline().(*redis.Pipeline)
})
assertPipeline()

View File

@ -342,7 +342,7 @@ func (c *Client) TxPipelined(fn func(Pipeliner) error) ([]Cmder, error) {
}
// TxPipeline acts like Pipeline, but wraps queued commands with MULTI/EXEC.
func (c *Client) TxPipeline() *Pipeline {
func (c *Client) TxPipeline() Pipeliner {
pipe := Pipeline{
exec: c.pipelineExecer(c.txPipelineProcessCmds),
}