diff --git a/commands.go b/commands.go index 99beb61f..56cdf9a6 100644 --- a/commands.go +++ b/commands.go @@ -1221,10 +1221,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 5aef878e..55479811 100644 --- a/redis_test.go +++ b/redis_test.go @@ -2597,7 +2597,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)}, ) }