mirror of https://github.com/go-redis/redis.git
Improve comment
This commit is contained in:
parent
1471ec2b0a
commit
167410bcd7
2
redis.go
2
redis.go
|
@ -383,6 +383,7 @@ func (c *Client) pubSub() *PubSub {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Subscribe subscribes the client to the specified channels.
|
// Subscribe subscribes the client to the specified channels.
|
||||||
|
// Channels can be omitted to create empty subscription.
|
||||||
func (c *Client) Subscribe(channels ...string) *PubSub {
|
func (c *Client) Subscribe(channels ...string) *PubSub {
|
||||||
pubsub := c.pubSub()
|
pubsub := c.pubSub()
|
||||||
if len(channels) > 0 {
|
if len(channels) > 0 {
|
||||||
|
@ -392,6 +393,7 @@ func (c *Client) Subscribe(channels ...string) *PubSub {
|
||||||
}
|
}
|
||||||
|
|
||||||
// PSubscribe subscribes the client to the given patterns.
|
// PSubscribe subscribes the client to the given patterns.
|
||||||
|
// Patterns can be omitted to create empty subscription.
|
||||||
func (c *Client) PSubscribe(channels ...string) *PubSub {
|
func (c *Client) PSubscribe(channels ...string) *PubSub {
|
||||||
pubsub := c.pubSub()
|
pubsub := c.pubSub()
|
||||||
if len(channels) > 0 {
|
if len(channels) > 0 {
|
||||||
|
|
Loading…
Reference in New Issue