https://github.com/rakyll/gotest
go test with colors
https://github.com/rakyll/gotest
Last synced: about 1 year ago
JSON representation
go test with colors
- Host: GitHub
- URL: https://github.com/rakyll/gotest
- Owner: rakyll
- License: bsd-3-clause
- Created: 2017-09-07T02:39:32.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-04-28T14:36:03.000Z (about 2 years ago)
- Last Synced: 2025-04-14T13:06:51.998Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 732 KB
- Stars: 1,360
- Watchers: 7
- Forks: 64
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ccamel - rakyll/gotest - go test with colors (Go)
README
# gotest
[](https://circleci.com/gh/rakyll/gotest)
Like `go test` but with colors.
## Installation
Use the pre-built binary for Linux 64-bit:
```
$ curl https://gotest-release.s3.amazonaws.com/gotest_linux > gotest && chmod +x gotest
```
Alternatively:
```
$ go get -u github.com/rakyll/gotest
```
# Usage
Accepts all the arguments and flags `go test` works with.
Example:
```
$ gotest -v github.com/jonasbn/go-test-demo
```

gotest comes with many colors! Configure the color of the output by setting the following env variable:
```
$ GOTEST_PALETTE="magenta,white"
```
The output will have magenta for failed cases, white for success.
Available colors: black, hiblack, red, hired, green, higreen, yellow, hiyellow, blue, hiblue, magenta, himagenta, cyan, hicyan, white, hiwhite.