Skip to content

Commit c98c5f0

Browse files
committed
fix: update ChannelWithSubscriptions to accept options
1 parent f44b325 commit c98c5f0

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ go 1.17
44

55
require (
66
github.com/cespare/xxhash/v2 v2.1.2
7-
github.com/davecgh/go-spew v1.1.1
87
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f
98
github.com/onsi/ginkgo v1.16.5
109
github.com/onsi/gomega v1.19.0

go.sum

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR
44
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
55
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
66
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
7-
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
87
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
98
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
109
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=

pubsub.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,9 +456,9 @@ func (c *PubSub) ChannelSize(size int) <-chan *Message {
456456
// reconnections.
457457
//
458458
// ChannelWithSubscriptions can not be used together with Channel or ChannelSize.
459-
func (c *PubSub) ChannelWithSubscriptions(_ context.Context, size int) <-chan interface{} {
459+
func (c *PubSub) ChannelWithSubscriptions(opts ...ChannelOption) <-chan interface{} {
460460
c.chOnce.Do(func() {
461-
c.allCh = newChannel(c, WithChannelSize(size))
461+
c.allCh = newChannel(c, opts...)
462462
c.allCh.initAllChan()
463463
})
464464
if c.allCh == nil {

0 commit comments

Comments
 (0)