chore: refactor code (#5352)

This commit is contained in:
Kevin Wan
2025-12-23 22:29:52 +08:00
committed by GitHub
parent 52df1c532a
commit 35ba024103
4 changed files with 20 additions and 17 deletions

View File

@@ -105,6 +105,7 @@ type (
AddListener(listener func())
GetValues() []string
}
container struct {
exclusive bool
values map[string][]string

View File

@@ -205,6 +205,7 @@ func TestSubscriber(t *testing.T) {
sub := new(Subscriber)
Exclusive()(sub)
c := newContainer(sub.exclusive)
WithContainer(c)(sub)
sub.items = c
var count int32
sub.AddListener(func() {