From ce9d9f8b2183bc0a31bfa40e780ae07182bc7cf8 Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 12 Jul 2026 14:09:36 +0200 Subject: added pubsub command registry --- pkg/commands/subscribe.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 pkg/commands/subscribe.go (limited to 'pkg/commands/subscribe.go') diff --git a/pkg/commands/subscribe.go b/pkg/commands/subscribe.go new file mode 100644 index 0000000..06dee13 --- /dev/null +++ b/pkg/commands/subscribe.go @@ -0,0 +1,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 +} \ No newline at end of file -- cgit v1.2.3