Skip to content

Commit

Permalink
fix(transport/grpc/resolver/discovery/resolver.go): remove attributes…
Browse files Browse the repository at this point in the history
….Attributes.New() (#2742)
  • Loading branch information
demoManito authored Mar 20, 2023
1 parent 78a2089 commit 0c2d263
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions transport/grpc/resolver/discovery/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,9 @@ func (r *discoveryResolver) Close() {

func (r *discoveryResolver) ResolveNow(options resolver.ResolveNowOptions) {}

func parseAttributes(md map[string]string) *attributes.Attributes {
var a *attributes.Attributes
func parseAttributes(md map[string]string) (a *attributes.Attributes) {
for k, v := range md {
if a == nil {
a = attributes.New(k, v)
} else {
a = a.WithValue(k, v)
}
a = a.WithValue(k, v)
}
return a
}

0 comments on commit 0c2d263

Please sign in to comment.