gotestdox icon indicating copy to clipboard operation
gotestdox copied to clipboard

Put prettify in separate package?

Open afbjorklund opened this issue 1 year ago • 1 comments

Hi, thank you for this interesting tool!

Would it be possible to put the Prettify function into a separate package for use as a library?

Now when you import gotestdox, you also get all the command dependencies like "color"...

Was testing it with go-test-report


--- a/go.mod
+++ b/go.mod
@@ -3,6 +3,7 @@ module github.com/vakenbolt/go-test-report
 go 1.17
 
 require (
+       github.com/bitfield/gotestdox v0.2.2
        github.com/spf13/cobra v1.7.0
        github.com/stretchr/testify v1.6.1
        golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
@@ -11,7 +12,12 @@ require (
 
 require (
        github.com/davecgh/go-spew v1.1.1 // indirect
+       github.com/fatih/color v1.15.0 // indirect
        github.com/inconshreveable/mousetrap v1.1.0 // indirect
+       github.com/mattn/go-colorable v0.1.13 // indirect
+       github.com/mattn/go-isatty v0.0.19 // indirect
        github.com/pmezard/go-difflib v1.0.0 // indirect
        github.com/spf13/pflag v1.0.5 // indirect
+       golang.org/x/sys v0.10.0 // indirect
+       golang.org/x/text v0.11.0 // indirect
 )

afbjorklund avatar Aug 28 '23 11:08 afbjorklund

https://github.com/afbjorklund/go-test-report/tree/gotestdox adds a --testdox flag (and a DisplayName)

afbjorklund avatar Aug 28 '23 11:08 afbjorklund