From c53e4978658f08924abee5eb9f3fd66104359940 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Thu, 16 Nov 2023 16:30:18 +0800 Subject: [PATCH] chore: use buffer.String() instead of string(buffer.Bytes()) --- unmarshaller_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unmarshaller_test.go b/unmarshaller_test.go index 79cec85..155da3e 100644 --- a/unmarshaller_test.go +++ b/unmarshaller_test.go @@ -73,7 +73,7 @@ func TestUnmarshalListOfStructsAfterMarshal(t *testing.T) { t.Fatalf("Error marshalling data to CSV: %#v", err) } - if string(buffer.Bytes()) != "Additional|Key\nnull|test\n" { + if buffer.String() != "Additional|Key\nnull|test\n" { t.Fatalf("Marshalled data had an unexpected form of %s", buffer.Bytes()) }