This repository provides a tiny script to colorize go test
.
/bin/bash
sed
- Copy
gotest
script to your$PATH
directory - Give it executable permission with
chmod +x
On CI, directly downloading gotest
with curl
would be sufficient in most cases as follows.
$ curl -L https://raw.githubusercontent.com/rhysd/gotest/master/gotest > gotest
$ bash ./gotest
$ gotest [args...]
Arguments are the same as go test
but -v
is always implied.
The reason I created this in spite of rakyll/gotest is that my requirements can be met with only ~20 lines of shell script. Smaller script is better because it can be modified/fixed easily and easy to understand and easy to test.
If you want to change colors, please modify the script directly. The color definitions at
top of the script (e.g. 92
for green, 91
for red) are ANSI escape sequences for colors.
Please modify them to use your favorite colors.