From 3e55fcd58b466156c1f8d87fd04cc63fc062ee8d Mon Sep 17 00:00:00 2001 From: schmidtw Date: Fri, 22 Sep 2023 16:16:11 -0700 Subject: [PATCH] Fix the newly identified lint issues. --- wrpclient/wrpclient_test.go | 4 +++- wrphttp/headers.go | 2 +- wrphttp/headers_test.go | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/wrpclient/wrpclient_test.go b/wrpclient/wrpclient_test.go index 49c816a..f803875 100644 --- a/wrpclient/wrpclient_test.go +++ b/wrpclient/wrpclient_test.go @@ -173,7 +173,9 @@ func TestSendWRP(t *testing.T) { client.httpClient = m } - err = client.SendWRP(ctx, &tc.response, &tc.request) + response := tc.response + request := tc.request + err = client.SendWRP(ctx, &response, &request) if tc.useMockHTTPClient { m.AssertExpectations(t) } diff --git a/wrphttp/headers.go b/wrphttp/headers.go index fa8f45c..151d6b4 100644 --- a/wrphttp/headers.go +++ b/wrphttp/headers.go @@ -31,7 +31,7 @@ import ( // Constant HTTP header strings representing WRP fields const ( MessageTypeHeader = "X-Xmidt-Message-Type" - TransactionUuidHeader = "X-Xmidt-Transaction-Uuid" + TransactionUuidHeader = "X-Xmidt-Transaction-Uuid" // nolint:gosec StatusHeader = "X-Xmidt-Status" RequestDeliveryResponseHeader = "X-Xmidt-Request-Delivery-Response" IncludeSpansHeader = "X-Xmidt-Include-Spans" diff --git a/wrphttp/headers_test.go b/wrphttp/headers_test.go index d74c737..228732b 100644 --- a/wrphttp/headers_test.go +++ b/wrphttp/headers_test.go @@ -400,7 +400,8 @@ func TestAddMessageHeaders(t *testing.T) { expected := record.expected actual := make(http.Header) - AddMessageHeaders(actual, &record.message) + message := record.message + AddMessageHeaders(actual, &message) for _, header := range regularHeaders { assert.Equal(expected[header], actual[header])