diff --git a/output/formatter.go b/output/formatter.go index 572e807..d829c53 100644 --- a/output/formatter.go +++ b/output/formatter.go @@ -124,17 +124,17 @@ func reportJUnitXML(w io.Writer, data *reportInfo) error { raw, err := xml.MarshalIndent(junitXMLStruct, "", "\t") if err != nil { - panic(err) + return err } xmlHeader := []byte("\n") raw = append(xmlHeader, raw...) _, err = w.Write(raw) if err != nil { - panic(err) + return err } - return err + return nil } func reportFromPlaintextTemplate(w io.Writer, reportTemplate string, data *reportInfo) error {