From a68c1609f053922a2f8d99b5243941309c056844 Mon Sep 17 00:00:00 2001 From: PJ Doerner Date: Thu, 12 Oct 2023 11:01:57 -0700 Subject: [PATCH] Remove double setting of caller-type header --- headersprovider/headers_provider.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/headersprovider/headers_provider.go b/headersprovider/headers_provider.go index 79c1d6b5..a39d9fac 100644 --- a/headersprovider/headers_provider.go +++ b/headersprovider/headers_provider.go @@ -2,8 +2,6 @@ package headersprovider import ( "context" - - h "github.com/temporalio/cli/headers" ) type HeadersProvider interface { @@ -18,18 +16,12 @@ type grpcHeaderProvider struct { headers map[string]string } -func newGrpcHeaderProvider(headers map[string]string) *grpcHeaderProvider { - provider := &grpcHeaderProvider{headers} - provider.headers[h.CallerTypeHeaderName] = h.CallerTypeHeaderCLI - return provider -} - func (a grpcHeaderProvider) GetHeaders(ctx context.Context) (map[string]string, error) { return a.headers, nil } func SetGRPCHeadersProvider(headers map[string]string) { - headersProvider = newGrpcHeaderProvider(headers) + headersProvider = &grpcHeaderProvider{headers} } func SetCurrent(hp HeadersProvider) {