From 7379f211a4dde9bff6a9bf5b5cb962c2e78282d1 Mon Sep 17 00:00:00 2001 From: Felipe Cavalcanti Date: Wed, 3 May 2017 10:48:12 -0300 Subject: [PATCH] Client TxPipeline method should also return a Pipeliner --- pipeline_test.go | 2 +- redis.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pipeline_test.go b/pipeline_test.go index 706ff59a..3f69e0c7 100644 --- a/pipeline_test.go +++ b/pipeline_test.go @@ -71,7 +71,7 @@ var _ = Describe("pipelining", func() { Describe("TxPipeline", func() { BeforeEach(func() { - pipe = client.TxPipeline() + pipe = client.TxPipeline().(*redis.Pipeline) }) assertPipeline() diff --git a/redis.go b/redis.go index e81100c4..ca88df0d 100644 --- a/redis.go +++ b/redis.go @@ -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), }