Move junit-formatter.go to its own package for use as a library.

This lets JUnit xml generation be integrated into larger tools
instead of having to run the `go-junit-report` binary as a subprocess.
This commit is contained in:
John Millikin
2018-03-16 16:09:48 -07:00
parent d9db44172d
commit 03cda22671
3 changed files with 5 additions and 3 deletions

View File

@ -9,6 +9,7 @@ import (
"strings"
"testing"
"github.com/jstemmer/go-junit-report/formatter"
"github.com/jstemmer/go-junit-report/parser"
)
@ -849,7 +850,7 @@ func testJUnitFormatter(t *testing.T, goVersion string) {
var junitReport bytes.Buffer
if err = JUnitReportXML(testCase.report, testCase.noXMLHeader, goVersion, &junitReport); err != nil {
if err = formatter.JUnitReportXML(testCase.report, testCase.noXMLHeader, goVersion, &junitReport); err != nil {
t.Fatal(err)
}