handle error

Amolith created

Change summary

main.go | 4 ++++
1 file changed, 4 insertions(+)

Detailed changes

main.go 🔗

@@ -95,6 +95,10 @@ func main() {
 	if *flagXMLOutput != "" {
 		newOPML := newOPML(opml)
 		marshalledOPML, err := xml.MarshalIndent(newOPML, "", "\t")
+		if err != nil {
+			fmt.Println(err)
+			os.Exit(1)
+		}
 		xmlBytes := []byte(xml.Header + string(marshalledOPML))
 
 		err = os.WriteFile(*flagXMLOutput, xmlBytes, 0o644)