From d97ffd7fea707f5a03608dbab462fdc150622f3f Mon Sep 17 00:00:00 2001 From: Erik Brakkee Date: Wed, 20 Nov 2024 21:54:52 +0100 Subject: [PATCH] root element rename to testsuite --- cmd/go2junit/go2junit.go | 3 ++- cmd/go2junit/output.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/go2junit/go2junit.go b/cmd/go2junit/go2junit.go index d803de4..d2c3092 100644 --- a/cmd/go2junit/go2junit.go +++ b/cmd/go2junit/go2junit.go @@ -70,7 +70,8 @@ func main() { filename := os.Args[1] var file *os.File if filename != "-" { - file, err := os.Open(filename) + file2, err := os.Open(filename) + file = file2 if err != nil { panic(err) } diff --git a/cmd/go2junit/output.go b/cmd/go2junit/output.go index 7b140c8..5f27ecd 100644 --- a/cmd/go2junit/output.go +++ b/cmd/go2junit/output.go @@ -8,7 +8,7 @@ import ( ) type Testsuites struct { - XMLName xml.Name `xml:"testsuites"` + XMLName xml.Name `xml:"testsuite"` Tests int `xml:"tests,attr"` Failures int `xml:"failures,attr"`