From f2e0a8b0a9f10bda27c1c3872723f9617215d9b9 Mon Sep 17 00:00:00 2001 From: cui fliter Date: Fri, 20 Sep 2024 07:41:55 +0800 Subject: [PATCH] Fix redundant operations on return values (#430) Signed-off-by: cuishuang --- storage/csv.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/storage/csv.go b/storage/csv.go index 7265a001..e89ad6b1 100644 --- a/storage/csv.go +++ b/storage/csv.go @@ -4,10 +4,11 @@ import ( "bytes" "encoding/csv" "fmt" + "sort" + "github.com/tomwright/dasel/v2" "github.com/tomwright/dasel/v2/dencoding" "github.com/tomwright/dasel/v2/util" - "sort" ) func init() { @@ -222,7 +223,7 @@ func (p *CSVParser) ToBytes(value dasel.Value, options ...ReadWriteOption) ([]by } } - return append(buffer.Bytes()), nil + return buffer.Bytes(), nil } func (p *CSVParser) toBytesHandleDoc(writer *csv.Writer, doc *CSVDocument) error {