From 47a98ca8903f79b65da405f857d3308933ce1a93 Mon Sep 17 00:00:00 2001 From: Jonathan Martz Date: Sun, 12 Jan 2025 12:21:51 +0100 Subject: [PATCH] tdd - move output above error --- mailer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mailer.go b/mailer.go index dc4ace8..a46acca 100644 --- a/mailer.go +++ b/mailer.go @@ -56,6 +56,8 @@ func main() { log.Fatal("PHPUnit output is empty. Please check your configuration.") } +fmt.Println(output.String()) + // Parse the JSON output var result map[string]interface{} if err := json.Unmarshal(output.Bytes(), &result); err != nil { @@ -68,8 +70,6 @@ func main() { log.Fatal("Counts field not found in PHPUnit output.") } -fmt.Println(output.String()) - // Serialize the counts field to JSON for the email body countsJSON, err := json.MarshalIndent(counts, "", " ") if err != nil {