Check err for xml.MarshalIndent

This commit is contained in:
blank X 2021-08-10 12:29:23 +07:00
parent ecf993bcc0
commit 16658e845d
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
1 changed files with 4 additions and 1 deletions

View File

@ -158,7 +158,10 @@ func main() {
Updated: item.Date.Format(time.RFC3339), 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)) fmt.Println(string(out))
} }