From 75241e2eb949159b9e9889bc33b685c981a7c640 Mon Sep 17 00:00:00 2001 From: CCpro10 <1797249167@qq.com> Date: Sat, 4 Mar 2023 20:35:47 +0800 Subject: [PATCH] refactor: Handle error that never occur --- utils.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/utils.go b/utils.go index 4021a2ab..a00e34c7 100644 --- a/utils.go +++ b/utils.go @@ -59,9 +59,8 @@ func (h H) MarshalXML(e *xml.Encoder, start xml.StartElement) error { Space: "", Local: "map", } - if err := e.EncodeToken(start); err != nil { - return err - } + _ = e.EncodeToken(start) + for key, value := range h { elem := xml.StartElement{ Name: xml.Name{Space: "", Local: key},