gotest

Like go test but with colors.

Installation

Pre-compiled binary

Download it from the OSS release page

Manually

clone the repository

$ git clone https://github.com/wesleimp/gotest

build

$ go build -o gotest main.go

Now you can copy the binary gotest to your bin folder or any other desired location

Usage

Accepts all the arguments and flags go test works with.

Examples:

$ gotest ./...
$ gotest -v github.com/jonasbn/go-test-demo

Customization

You can customize the color of the output by setting the following env variable with pattern <PASS>,<FAIL>,<SKIP>

Example:

$ GOTEST_COLORS="#b8bb26,#fb4934,#fabd2f"

See lipgloss for more info about colors

Acknowledgements

This package is a modified version of the great rakyll/gotest.

Changes are mostly related to customization, distribution and some bug fixes.

Make sure to check out the original work by rakyll!

GitHub

View Github