1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-01-07 23:02:12 +02:00

fix resolver (#740)

This commit is contained in:
邓小川 2021-03-05 19:15:19 +08:00 committed by GitHub
parent 330d878aa3
commit 27dc0d45df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -87,7 +87,7 @@ func dial(ctx context.Context, insecure bool, opts ...ClientOption) (*grpc.Clien
grpc.WithUnaryInterceptor(UnaryClientInterceptor(options.middleware)),
}
if options.discoverer != nil {
grpc.WithResolvers(discovery.NewBuilder(options.discoverer))
grpcOpts = append(grpcOpts, grpc.WithResolvers(discovery.NewBuilder(options.discoverer)))
}
if insecure {
grpcOpts = append(grpcOpts, grpc.WithInsecure())

View File

@ -70,5 +70,5 @@ func parseAttributes(md map[string]string) *attributes.Attributes {
for k, v := range md {
pairs = append(pairs, k, v)
}
return attributes.New(pairs)
return attributes.New(pairs...)
}