From eaa3aed1188873c734dd6e283111f811745cca61 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Mon, 18 Jan 2021 18:19:08 +0300 Subject: Fix golangci lint warnings --- tests/plugins/http/response_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/plugins') diff --git a/tests/plugins/http/response_test.go b/tests/plugins/http/response_test.go index 9bd2626d..dc9856ac 100644 --- a/tests/plugins/http/response_test.go +++ b/tests/plugins/http/response_test.go @@ -75,9 +75,10 @@ func TestNewResponse_Stream(t *testing.T) { // r is pointer, so, it might be nil if r == nil { t.Fatal("response is nil") + return } - r.Body = &bytes.Buffer{} + r.Body = new(bytes.Buffer) r.Body.(*bytes.Buffer).WriteString("hello world") assert.NoError(t, err) @@ -99,6 +100,7 @@ func TestNewResponse_StreamError(t *testing.T) { // r is pointer, so, it might be nil if r == nil { t.Fatal("response is nil") + return } r.Body = &bytes.Buffer{} -- cgit v1.2.3