Skip to content

danieldn/tc

Repository files navigation

testcolor

Build Status Go Report Card codecov

tc pretty prints your 'go test' output

Before:

before

After:

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

How It Works

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.

Performance

This tool relies on Go's bytes.Buffer to minimize memory allocation when reading and editing text input.

Inspired By

Releases

No releases published

Packages

No packages published

Languages