From a0e851fa4d500ab46cdcaa0deb919e586c081547 Mon Sep 17 00:00:00 2001 From: Asim Date: Wed, 16 Mar 2016 10:08:10 +0000 Subject: [PATCH] Update to match go-micro interface --- nats.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/nats.go b/nats.go index 2f0f151..7c99bb9 100644 --- a/nats.go +++ b/nats.go @@ -142,9 +142,14 @@ func (n *nbroker) String() string { return "nats" } -func NewBroker(addrs []string, opt ...broker.Option) broker.Broker { +func NewBroker(opts ...broker.Option) broker.Broker { + var options broker.Options + for _, o := range opts { + o(&options) + } + var cAddrs []string - for _, addr := range addrs { + for _, addr := range options.Addrs { if len(addr) == 0 { continue }