From aa3d6c5363419821f7c175282e8e5476a6fa3cb3 Mon Sep 17 00:00:00 2001 From: astaxie Date: Wed, 19 Jul 2017 00:37:42 +0800 Subject: [PATCH] fix the gosimple --- error_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/error_test.go b/error_test.go index 2fb8f962..378aa953 100644 --- a/error_test.go +++ b/error_test.go @@ -52,7 +52,7 @@ func TestErrorCode_01(t *testing.T) { if w.Code != code { t.Fail() } - if !strings.Contains(string(w.Body.Bytes()), http.StatusText(code)) { + if !strings.Contains(w.Body.String(), http.StatusText(code)) { t.Fail() } } @@ -82,7 +82,7 @@ func TestErrorCode_03(t *testing.T) { if w.Code != 200 { t.Fail() } - if string(w.Body.Bytes()) != parseCodeError { + if w.Body.String() != parseCodeError { t.Fail() } }