1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

Move Publish channel to cmdable. Remove method that was deprecated in v3.

This commit is contained in:
Vladimir Mihailenco
2016-07-21 13:04:40 +00:00
parent eca5d02f24
commit 4210c090b1
5 changed files with 37 additions and 34 deletions

View File

@ -1618,6 +1618,13 @@ func (c *cmdable) DebugObject(key string) *StringCmd {
//------------------------------------------------------------------------------
// Publish posts the message to the channel.
func (c *cmdable) Publish(channel, message string) *IntCmd {
cmd := NewIntCmd("PUBLISH", channel, message)
c.process(cmd)
return cmd
}
func (c *cmdable) PubSubChannels(pattern string) *StringSliceCmd {
args := []interface{}{"pubsub", "channels"}
if pattern != "*" {