rakyll / gotest

go test with colors
BSD 3-Clause "New" or "Revised" License
1.35k stars 62 forks source link

Fix coloration leakage into non-status output #9

Closed subtlepseudonym closed 5 years ago

subtlepseudonym commented 6 years ago

Output that isn't prepended with a status like "ok" or "FAIL" is being colorized.

For example, if the line "ok github.com/some/package" is followed by "some/package/file.go:20:10 there was an error", the second line will be colored green. This is confusing, because the second line is likely error output belonging to the subsequent test.

This fix will reset the color palette after colorizing status-related output.

senorprogrammer commented 5 years ago

Out of curiosity, the practical value of your PR is the five lines main.go. Yet your PR changes every file in the repo and also the original author's repo links in the README. Why was all that extra done? It seems unnecessary.

subtlepseudonym commented 5 years ago

Everything beyond the first two commits was added after the pull request and probably shouldn't be a part of the PR with the possible exception of removing the vendor directory.

I'll put the relevant commits into another branch and reopen the PR.

subtlepseudonym commented 5 years ago

Closing this in favor of https://github.com/rakyll/gotest/pull/10