Merge pull request #201 from vans9/register-subscriber-pass-opts

Pass options to the s.NewSubscriber
This commit is contained in:
Asim Aslam 2017-08-24 08:53:50 +01:00 committed by GitHub
commit 1748328f14

View File

@ -81,5 +81,5 @@ func RegisterHandler(s server.Server, h interface{}, opts ...server.HandlerOptio
// RegisterSubscriber is syntactic sugar for registering a subscriber // RegisterSubscriber is syntactic sugar for registering a subscriber
func RegisterSubscriber(topic string, s server.Server, h interface{}, opts ...server.SubscriberOption) error { func RegisterSubscriber(topic string, s server.Server, h interface{}, opts ...server.SubscriberOption) error {
return s.Subscribe(s.NewSubscriber(topic, h)) return s.Subscribe(s.NewSubscriber(topic, h, opts...))
} }