Skip to content

Add pub sub features, tests, and update main.go, along with README#8

Merged
BryceWayne merged 2 commits intorootfrom
feature/pubsub
Dec 15, 2024
Merged

Add pub sub features, tests, and update main.go, along with README#8
BryceWayne merged 2 commits intorootfrom
feature/pubsub

Conversation

@BryceWayne
Copy link
Owner

No description provided.

@BryceWayne BryceWayne requested a review from Copilot December 15, 2024 23:44
@BryceWayne BryceWayne self-assigned this Dec 15, 2024
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

main.go:128

  • The comment on line 128 is duplicated and should be removed.
// demonstratePubSub shows the publish/subscribe functionality

main.go:178

  • [nitpick] The variable 'pattern' is used inconsistently in log messages. Ensure consistent usage across the function.
log.Printf("Listening on pattern: %s", pattern)

@BryceWayne BryceWayne requested a review from Copilot December 15, 2024 23:52
@BryceWayne BryceWayne merged commit e45fad6 into root Dec 15, 2024
1 check passed
@BryceWayne BryceWayne deleted the feature/pubsub branch December 15, 2024 23:53
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (6)

main.go:128

  • Duplicated comment: 'demonstratePubSub shows the publish/subscribe functionality'.
// demonstratePubSub shows the publish/subscribe functionality

main.go:185

  • Error handling for 'json.Unmarshal' should log the error and continue processing other messages.
if err := json.Unmarshal(msg, &status); err == nil {

main.go:201

  • The timeout for receiving messages should be covered by tests to ensure proper handling.
case <-time.After(2 * time.Second):

memorystore/memorystore.go:23

  • The comment for the MemoryStore struct should be updated to include the new ps field.
type MemoryStore struct {

memorystore/memorystore.go:42

  • Ensure that the initialization of the PubSub manager is covered by tests.
ms.initPubSub()

memorystore/memorystore.go:66

  • Ensure that the cleanup of the PubSub manager is covered by tests.
m.cleanupPubSub()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant