aboutsummaryrefslogtreecommitdiff
path: root/pkg/commands/subscribe.go
blob: 06dee13c8b0f9513d0a72156ce6e9d0b9f2b46e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
package commands

import (
	"net"
	"redisClone/pkg/pubsub"
)

func Subscribe(hub *pubsub.Hub, conn net.Conn, args []string) interface{}{
	for _, channel := range args[1:]{
		hub.Subscribe(conn,channel)
	}
	return nil
}