From 9fb220096a8a50bd89f0d7578d572629531f8141 Mon Sep 17 00:00:00 2001 From: Alexander Neonxp Kiryukhin Date: Sat, 24 Jan 2026 17:56:58 +0300 Subject: v1.0.1 --- opts.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'opts.go') diff --git a/opts.go b/opts.go index 620e263..905c193 100644 --- a/opts.go +++ b/opts.go @@ -1,24 +1,27 @@ package eventbus type Opt interface { - Apply(b *bus) + Apply(b *Bus) } +// NameSeparator sets the event name separator (default "."). type NameSeparator string -func (n NameSeparator) Apply(b *bus) { +func (n NameSeparator) Apply(b *Bus) { b.nameSeparator = string(n) } +// Wildcard sets the wildcard character for subscriptions (default "*"). type Wildcard string -func (w Wildcard) Apply(b *bus) { +func (w Wildcard) Apply(b *Bus) { b.wildcard = string(w) } +// Capacity sets the initial capacity for listeners trie (default 32). type Capacity int -func (c Capacity) Apply(b *bus) { +func (c Capacity) Apply(b *Bus) { b.listeners = node[Listener]{ children: make(map[string]*node[Listener], c), values: make([]Listener, 0, c), -- cgit v1.2.3