From 8a802d8f7afc0191f994051c94e9630d0a528a18 Mon Sep 17 00:00:00 2001 From: Ben Toogood Date: Thu, 14 May 2020 18:00:13 +0100 Subject: [PATCH] Fix registry address option unused --- registry/service/service.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/registry/service/service.go b/registry/service/service.go index ddf6fd00..894c74c2 100644 --- a/registry/service/service.go +++ b/registry/service/service.go @@ -47,6 +47,10 @@ func (s *serviceRegistry) Init(opts ...registry.Option) error { o(&s.opts) } + if len(s.opts.Addrs) > 0 { + s.address = s.opts.Addrs + } + // extract the client from the context, fallback to grpc var cli client.Client if c, ok := s.opts.Context.Value(clientKey{}).(client.Client); ok {