From d84b066208dc4dd68a5970b7eae99dddd0088495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Stemmer?= Date: Wed, 20 Apr 2022 19:34:40 +0100 Subject: [PATCH] Move packages out of pkg/ --- go-junit-report.go | 6 +++--- go-junit-report_test.go | 4 ++-- {pkg/gtr => gtr}/gtr.go | 0 {pkg/gtr => gtr}/gtr_test.go | 0 {pkg/junit => junit}/junit.go | 2 +- {pkg/junit => junit}/junit_test.go | 2 +- {pkg/parser => parser}/gotest/event.go | 0 {pkg/parser => parser}/gotest/gotest.go | 2 +- {pkg/parser => parser}/gotest/gotest_test.go | 7 ++++--- {pkg/parser => parser}/gotest/json.go | 2 +- {pkg/parser => parser}/gotest/json_test.go | 0 {pkg/parser => parser}/gotest/report_builder.go | 2 +- testdata/generate-golden.go | 6 +++--- 13 files changed, 17 insertions(+), 16 deletions(-) rename {pkg/gtr => gtr}/gtr.go (100%) rename {pkg/gtr => gtr}/gtr_test.go (100%) rename {pkg/junit => junit}/junit.go (99%) rename {pkg/junit => junit}/junit_test.go (98%) rename {pkg/parser => parser}/gotest/event.go (100%) rename {pkg/parser => parser}/gotest/gotest.go (99%) rename {pkg/parser => parser}/gotest/gotest_test.go (98%) rename {pkg/parser => parser}/gotest/json.go (96%) rename {pkg/parser => parser}/gotest/json_test.go (100%) rename {pkg/parser => parser}/gotest/report_builder.go (99%) diff --git a/go-junit-report.go b/go-junit-report.go index 447fbed..23dc1a5 100644 --- a/go-junit-report.go +++ b/go-junit-report.go @@ -9,9 +9,9 @@ import ( "os" "strings" - "github.com/jstemmer/go-junit-report/v2/pkg/gtr" - "github.com/jstemmer/go-junit-report/v2/pkg/junit" - "github.com/jstemmer/go-junit-report/v2/pkg/parser/gotest" + "github.com/jstemmer/go-junit-report/v2/gtr" + "github.com/jstemmer/go-junit-report/v2/junit" + "github.com/jstemmer/go-junit-report/v2/parser/gotest" ) var ( diff --git a/go-junit-report_test.go b/go-junit-report_test.go index 1de43ea..cd8065c 100644 --- a/go-junit-report_test.go +++ b/go-junit-report_test.go @@ -12,8 +12,8 @@ import ( "testing" "time" - "github.com/jstemmer/go-junit-report/v2/pkg/junit" - "github.com/jstemmer/go-junit-report/v2/pkg/parser/gotest" + "github.com/jstemmer/go-junit-report/v2/junit" + "github.com/jstemmer/go-junit-report/v2/parser/gotest" "github.com/google/go-cmp/cmp" ) diff --git a/pkg/gtr/gtr.go b/gtr/gtr.go similarity index 100% rename from pkg/gtr/gtr.go rename to gtr/gtr.go diff --git a/pkg/gtr/gtr_test.go b/gtr/gtr_test.go similarity index 100% rename from pkg/gtr/gtr_test.go rename to gtr/gtr_test.go diff --git a/pkg/junit/junit.go b/junit/junit.go similarity index 99% rename from pkg/junit/junit.go rename to junit/junit.go index ca1abb6..69c9046 100644 --- a/pkg/junit/junit.go +++ b/junit/junit.go @@ -8,7 +8,7 @@ import ( "strings" "time" - "github.com/jstemmer/go-junit-report/v2/pkg/gtr" + "github.com/jstemmer/go-junit-report/v2/gtr" ) // Testsuites is a collection of JUnit testsuites. diff --git a/pkg/junit/junit_test.go b/junit/junit_test.go similarity index 98% rename from pkg/junit/junit_test.go rename to junit/junit_test.go index 9700374..a5861f9 100644 --- a/pkg/junit/junit_test.go +++ b/junit/junit_test.go @@ -4,7 +4,7 @@ import ( "encoding/xml" "testing" - "github.com/jstemmer/go-junit-report/v2/pkg/gtr" + "github.com/jstemmer/go-junit-report/v2/gtr" "github.com/google/go-cmp/cmp" ) diff --git a/pkg/parser/gotest/event.go b/parser/gotest/event.go similarity index 100% rename from pkg/parser/gotest/event.go rename to parser/gotest/event.go diff --git a/pkg/parser/gotest/gotest.go b/parser/gotest/gotest.go similarity index 99% rename from pkg/parser/gotest/gotest.go rename to parser/gotest/gotest.go index 447e544..9ff7927 100644 --- a/pkg/parser/gotest/gotest.go +++ b/parser/gotest/gotest.go @@ -10,7 +10,7 @@ import ( "strings" "time" - "github.com/jstemmer/go-junit-report/v2/pkg/gtr" + "github.com/jstemmer/go-junit-report/v2/gtr" ) var ( diff --git a/pkg/parser/gotest/gotest_test.go b/parser/gotest/gotest_test.go similarity index 98% rename from pkg/parser/gotest/gotest_test.go rename to parser/gotest/gotest_test.go index 1090816..ce83e62 100644 --- a/pkg/parser/gotest/gotest_test.go +++ b/parser/gotest/gotest_test.go @@ -6,8 +6,9 @@ import ( "testing" "time" + "github.com/jstemmer/go-junit-report/v2/gtr" + "github.com/google/go-cmp/cmp" - "github.com/jstemmer/go-junit-report/v2/pkg/gtr" ) var ( @@ -289,8 +290,8 @@ func TestReport(t *testing.T) { NsPerOp: 100, }, { - Name: "BenchmarkTwo", - Result: gtr.Fail, + Name: "BenchmarkTwo", + Result: gtr.Fail, }, }, Output: []string{"goarch: amd64"}, diff --git a/pkg/parser/gotest/json.go b/parser/gotest/json.go similarity index 96% rename from pkg/parser/gotest/json.go rename to parser/gotest/json.go index df5ddb2..7a55d48 100644 --- a/pkg/parser/gotest/json.go +++ b/parser/gotest/json.go @@ -6,7 +6,7 @@ import ( "io" "time" - "github.com/jstemmer/go-junit-report/v2/pkg/gtr" + "github.com/jstemmer/go-junit-report/v2/gtr" ) // NewJSONParser returns a new Go test json output parser. diff --git a/pkg/parser/gotest/json_test.go b/parser/gotest/json_test.go similarity index 100% rename from pkg/parser/gotest/json_test.go rename to parser/gotest/json_test.go diff --git a/pkg/parser/gotest/report_builder.go b/parser/gotest/report_builder.go similarity index 99% rename from pkg/parser/gotest/report_builder.go rename to parser/gotest/report_builder.go index 4ca6c42..26b4ca2 100644 --- a/pkg/parser/gotest/report_builder.go +++ b/parser/gotest/report_builder.go @@ -3,7 +3,7 @@ package gotest import ( "time" - "github.com/jstemmer/go-junit-report/v2/pkg/gtr" + "github.com/jstemmer/go-junit-report/v2/gtr" ) // reportBuilder helps build a test Report from a collection of events. diff --git a/testdata/generate-golden.go b/testdata/generate-golden.go index c7363a7..95f1cae 100644 --- a/testdata/generate-golden.go +++ b/testdata/generate-golden.go @@ -12,9 +12,9 @@ import ( "strings" "time" - "github.com/jstemmer/go-junit-report/v2/pkg/gtr" - "github.com/jstemmer/go-junit-report/v2/pkg/junit" - "github.com/jstemmer/go-junit-report/v2/pkg/parser/gotest" + "github.com/jstemmer/go-junit-report/v2/gtr" + "github.com/jstemmer/go-junit-report/v2/junit" + "github.com/jstemmer/go-junit-report/v2/parser/gotest" ) var verbose bool