From ec7977891e09271e7a9085d6ab124fc9b194f0cf Mon Sep 17 00:00:00 2001 From: Karmanyaah Malhotra Date: Sun, 17 Dec 2023 17:11:41 -0600 Subject: [PATCH] format --- server/topic.go | 6 +++--- server/types.go | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/server/topic.go b/server/topic.go index b78ea0965..aafaee30c 100644 --- a/server/topic.go +++ b/server/topic.go @@ -39,9 +39,9 @@ type subscriber func(v *visitor, msg *message) error // newTopic creates a new topic func newTopic(id string) *topic { return &topic{ - ID: id, - subscribers: make(map[int]*topicSubscriber), - lastAccess: time.Now(), + ID: id, + subscribers: make(map[int]*topicSubscriber), + lastAccess: time.Now(), neverSubscribed: true, } } diff --git a/server/types.go b/server/types.go index 83b0ca9ba..9b69962d4 100644 --- a/server/types.go +++ b/server/types.go @@ -13,11 +13,11 @@ import ( // List of possible events const ( - openEvent = "open" - keepaliveEvent = "keepalive" - messageEvent = "message" - pollRequestEvent = "poll_request" - createdNewTopicParameter = "new_topic" + openEvent = "open" + openCreatedNewTopic = "new_topic" + keepaliveEvent = "keepalive" + messageEvent = "message" + pollRequestEvent = "poll_request" ) const ( @@ -127,7 +127,7 @@ func newMessage(event, topic, msg string) *message { func newOpenMessage(topic string, createdNewTopics bool) *message { msg := "" if createdNewTopics { // can expand this to a comma seperated string for more future parameters - msg = createdNewTopicParameter + msg = openCreatedNewTopic } return newMessage(openEvent, topic, msg) }