rhysd / gotest

Tiny single script to colorize `go test`

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Colorize go test

CI

This repository provides a tiny script to colorize go test.

sreenshot

Prerequisites

  • /bin/bash
  • sed

Installation

  1. Copy gotest script to your $PATH directory
  2. 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

Usage

$ 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.

Change colors

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.

License

MIT License

About

Tiny single script to colorize `go test`

License:MIT License


Languages

Language:Ruby 53.5%Language:Shell 32.0%Language:Go 14.5%