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