diff --git a/pipeline_test.go b/pipeline_test.go index 706ff59..3f69e0c 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 e81100c..ca88df0 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), }