diff options
author | Valery Piashchynski <[email protected]> | 2021-01-18 18:19:08 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-01-18 18:19:08 +0300 |
commit | eaa3aed1188873c734dd6e283111f811745cca61 (patch) | |
tree | 7b63544ead9f87af8493ebfb95a742acc263278e /tests | |
parent | 4c32ad8cf5c2f70086ded5d11460be598b4c8117 (diff) |
Fix golangci lint warnings
Diffstat (limited to 'tests')
-rw-r--r-- | tests/plugins/http/response_test.go | 4 |
1 files changed, 3 insertions, 1 deletions
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{} |