From 20c6a57d68e132aea0d4f4855323ca51f7cc0c6d Mon Sep 17 00:00:00 2001 From: Becca Petrin Date: Thu, 10 May 2018 10:10:08 -0700 Subject: [PATCH] dont reuse err on multiple goroutines (#4545) --- http/forwarded_for_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/http/forwarded_for_test.go b/http/forwarded_for_test.go index 5d60391353..0eec439f4a 100644 --- a/http/forwarded_for_test.go +++ b/http/forwarded_for_test.go @@ -44,7 +44,7 @@ func TestHandler_XForwardedFor(t *testing.T) { client := cluster.Cores[0].Client req := client.NewRequest("GET", "/") - _, err = client.RawRequest(req) + _, err := client.RawRequest(req) if err == nil { t.Fatal("expected error") } @@ -128,7 +128,7 @@ func TestHandler_XForwardedFor(t *testing.T) { req := client.NewRequest("GET", "/") req.Headers = make(http.Header) req.Headers.Set("x-forwarded-for", "5.6.7.8") - _, err = client.RawRequest(req) + _, err := client.RawRequest(req) if err == nil { t.Fatal("expected error") } @@ -162,7 +162,7 @@ func TestHandler_XForwardedFor(t *testing.T) { req := client.NewRequest("GET", "/") req.Headers = make(http.Header) req.Headers.Set("x-forwarded-for", "2.3.4.5,3.4.5.6") - _, err = client.RawRequest(req) + _, err := client.RawRequest(req) if err == nil { t.Fatal("expected error") }