From b7c128a33cfa79a8ae45b1865b453c7b9353a3c8 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Sun, 18 Jan 2026 18:11:27 -0500 Subject: [PATCH] chore: simplify struct initialization to direct return MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 💘 Generated with Crush Assisted-by: GLM-4.7 via Crush --- internal/pubsub/broker.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/pubsub/broker.go b/internal/pubsub/broker.go index d14877353819d4462f42d4e41997e92527843c98..2faf7f89b7c982950bfc69801a7901526e37eec4 100644 --- a/internal/pubsub/broker.go +++ b/internal/pubsub/broker.go @@ -20,12 +20,11 @@ func NewBroker[T any]() *Broker[T] { } func NewBrokerWithOptions[T any](channelBufferSize, maxEvents int) *Broker[T] { - b := &Broker[T]{ + return &Broker[T]{ subs: make(map[chan Event[T]]struct{}), done: make(chan struct{}), maxEvents: maxEvents, } - return b } func (b *Broker[T]) Shutdown() {