1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-18 08:26:38 +02:00

Merge branch 'master' into registy-not-found

This commit is contained in:
ben-toogood 2020-05-14 19:39:43 +01:00 committed by GitHub
commit 56f281002b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,6 +48,10 @@ func (s *serviceRegistry) Init(opts ...registry.Option) error {
o(&s.opts) o(&s.opts)
} }
if len(s.opts.Addrs) > 0 {
s.address = s.opts.Addrs
}
// extract the client from the context, fallback to grpc // extract the client from the context, fallback to grpc
var cli client.Client var cli client.Client
if c, ok := s.opts.Context.Value(clientKey{}).(client.Client); ok { if c, ok := s.opts.Context.Value(clientKey{}).(client.Client); ok {