From 381e37c723c608d5407ccab87b0b992f1e2e835c Mon Sep 17 00:00:00 2001
From: guangwu <guoguangwu@magic-shield.com>
Date: Tue, 24 Oct 2023 09:41:14 +0800
Subject: [PATCH] chore: use stdbuf.String() instead of string(stdbuf.Bytes())

---
 api_tests/marshal_json_escape_test.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/api_tests/marshal_json_escape_test.go b/api_tests/marshal_json_escape_test.go
index b50e72ff..3d7ac70b 100644
--- a/api_tests/marshal_json_escape_test.go
+++ b/api_tests/marshal_json_escape_test.go
@@ -38,7 +38,7 @@ func TestEncodeEscape(t *testing.T) {
 	stdenc.SetEscapeHTML(false)
 	err = stdenc.Encode(container)
 	should.Nil(err)
-	stdout := string(stdbuf.Bytes())
+	stdout := stdbuf.String()
 	if stdout[len(stdout)-1:] == "\n" {
 		stdout = stdout[:len(stdout)-1]
 	}