mirror of
https://github.com/go-micro/go-micro.git
synced 2024-12-18 08:26:38 +02:00
Fix registry address option unused
This commit is contained in:
parent
b4c0224746
commit
8a802d8f7a
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user