From 5be001d9628fc716b36975039ea212d80029398f Mon Sep 17 00:00:00 2001 From: Cody Oss Date: Fri, 19 Apr 2024 17:00:20 -0500 Subject: [PATCH] fix: default defaultEndpointTemplate --- transport/grpc/dial.go | 4 ++-- transport/http/dial.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/transport/grpc/dial.go b/transport/grpc/dial.go index 5ec81f85018..2e66d02b378 100644 --- a/transport/grpc/dial.go +++ b/transport/grpc/dial.go @@ -213,8 +213,8 @@ func dialPoolNewAuth(ctx context.Context, secure bool, poolSize int, ds *interna } // Defaults for older clients that don't set this value yet - var defaultEndpointTemplate string - if ds.DefaultEndpointTemplate == "" { + defaultEndpointTemplate := ds.DefaultEndpointTemplate + if defaultEndpointTemplate == "" { defaultEndpointTemplate = ds.DefaultEndpoint } diff --git a/transport/http/dial.go b/transport/http/dial.go index 64c881025a1..2043118b528 100644 --- a/transport/http/dial.go +++ b/transport/http/dial.go @@ -91,8 +91,8 @@ func newClientNewAuth(ctx context.Context, ds *internal.DialSettings) (*http.Cli } // Defaults for older clients that don't set this value yet - var defaultEndpointTemplate string - if ds.DefaultEndpointTemplate == "" { + defaultEndpointTemplate := ds.DefaultEndpointTemplate + if defaultEndpointTemplate == "" { defaultEndpointTemplate = ds.DefaultEndpoint }