Skip to content

Commit

Permalink
Replace deprecated target.Authority with target.URL.Host
Browse files Browse the repository at this point in the history
  • Loading branch information
huikang committed Aug 7, 2023
1 parent aa9d440 commit b1d2229
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions agent/grpc-internal/resolver/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ func (r *registry) Build(target resolver.Target, cc resolver.ClientConn, opts re
r.lock.RLock()
defer r.lock.RUnlock()
//nolint:staticcheck
res, ok := r.byAuthority[target.Authority]
res, ok := r.byAuthority[target.URL.Host]
if !ok {
//nolint:staticcheck
return nil, fmt.Errorf("no resolver registered for %v", target.Authority)
return nil, fmt.Errorf("no resolver registered for %v", target.URL.Host)
}
return res.Build(target, cc, opts)
}
Expand Down

0 comments on commit b1d2229

Please sign in to comment.