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), }