From c54b83179617fedb5fd917341d8e20e4c52f0ac4 Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Thu, 6 Nov 2014 13:13:24 +0200 Subject: [PATCH] Fix PubSubNumSub to work with Redis 2.8.14. --- commands.go | 4 ++-- redis_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/commands.go b/commands.go index 01e758a..1d1e358 100644 --- a/commands.go +++ b/commands.go @@ -1217,10 +1217,10 @@ func (c *Client) PubSubChannels(pattern string) *StringSliceCmd { return cmd } -func (c *Client) PubSubNumSub(channels ...string) *StringSliceCmd { +func (c *Client) PubSubNumSub(channels ...string) *SliceCmd { args := []string{"PUBSUB", "NUMSUB"} args = append(args, channels...) - cmd := NewStringSliceCmd(args...) + cmd := NewSliceCmd(args...) c.Process(cmd) return cmd } diff --git a/redis_test.go b/redis_test.go index 2407795..6a7ce8b 100644 --- a/redis_test.go +++ b/redis_test.go @@ -2589,7 +2589,7 @@ func (t *RedisTest) TestPubSubNumSub(c *C) { c.Assert( channels, DeepEquals, - []string{"mychannel", "1", "mychannel2", "1", "mychannel3", "0"}, + []interface{}{"mychannel", int64(1), "mychannel2", int64(1), "mychannel3", int64(0)}, ) }