diff --git a/junit-formatter.go b/formatter/formatter.go similarity index 99% rename from junit-formatter.go rename to formatter/formatter.go index f497303..a096b54 100644 --- a/junit-formatter.go +++ b/formatter/formatter.go @@ -1,4 +1,4 @@ -package main +package formatter import ( "bufio" diff --git a/go-junit-report.go b/go-junit-report.go index dcb68a3..5c2e433 100644 --- a/go-junit-report.go +++ b/go-junit-report.go @@ -5,6 +5,7 @@ import ( "fmt" "os" + "github.com/jstemmer/go-junit-report/formatter" "github.com/jstemmer/go-junit-report/parser" ) @@ -33,7 +34,7 @@ func main() { } // Write xml - err = JUnitReportXML(report, noXMLHeader, goVersionFlag, os.Stdout) + err = formatter.JUnitReportXML(report, noXMLHeader, goVersionFlag, os.Stdout) if err != nil { fmt.Printf("Error writing XML: %s\n", err) os.Exit(1) diff --git a/go-junit-report_test.go b/go-junit-report_test.go index da28d89..a8255d9 100644 --- a/go-junit-report_test.go +++ b/go-junit-report_test.go @@ -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) }