From a52228ee8ac671a3bf6f90c58970ce3612dd185c Mon Sep 17 00:00:00 2001 From: daheige Date: Sat, 5 Jun 2021 16:48:01 +0800 Subject: [PATCH] unnecessary use of fmt.Sprint --- context_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/context_test.go b/context_test.go index e0de717e..3e0b1759 100644 --- a/context_test.go +++ b/context_test.go @@ -1329,7 +1329,8 @@ func TestContextAbortWithStatusJSON(t *testing.T) { _, err := buf.ReadFrom(w.Body) assert.NoError(t, err) jsonStringBody := buf.String() - assert.Equal(t, fmt.Sprint("{\"foo\":\"fooValue\",\"bar\":\"barValue\"}"), jsonStringBody) + // S1039: unnecessary use of fmt.Sprint (gosimple) + assert.Equal(t, `{"foo":"fooValue","bar":"barValue"}`, jsonStringBody) } func TestContextError(t *testing.T) {