From b1d22294d5c4d76f3a1c30e710e0c7e7578d399c Mon Sep 17 00:00:00 2001 From: cskh Date: Mon, 7 Aug 2023 10:36:19 -0400 Subject: [PATCH] Replace deprecated target.Authority with target.URL.Host --- agent/grpc-internal/resolver/registry.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agent/grpc-internal/resolver/registry.go b/agent/grpc-internal/resolver/registry.go index 650915becc32..5151cfd46ce0 100644 --- a/agent/grpc-internal/resolver/registry.go +++ b/agent/grpc-internal/resolver/registry.go @@ -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) }