tc pretty prints your 'go test' output
Before:
After:
Install using
go get github.com/danieldn/tc
Then pipe your go test
output
go test -v ./... | tc
Disable features you don't want with flags
Usage:
go test -v ./... | tc [flags]
Optional flags:
-nocolor
Disables color (default false)
-nofmt
Disables formatting (default false)
Add tc
to your travis.yml
before_install:
- go get github.com/danieldn/tc
script:
- go test -v ./... | tc
- go build
This tool was made just using the standard Go library. It parses input to a buffer and performs a pattern search to insert ANSI color escape codes and text formatting where we want.
This tool relies on Go's bytes.Buffer to minimize memory allocation when reading and editing text input.