From 16658e845df588ba58a73c9950a7cc45dd7be7e4 Mon Sep 17 00:00:00 2001 From: blank X Date: Tue, 10 Aug 2021 12:29:23 +0700 Subject: [PATCH] Check err for xml.MarshalIndent --- main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 5d39be2..ecc3af5 100644 --- a/main.go +++ b/main.go @@ -158,7 +158,10 @@ func main() { Updated: item.Date.Format(time.RFC3339), }) } - out, _ := xml.MarshalIndent(feed, "", " ") + out, err := xml.MarshalIndent(feed, "", " ") + if err != nil { + log.Fatal(err) + } fmt.Println(string(out)) }