Gt is a wrapper for “go test” that caches test results.
The usage of “gt” is nearly identical to that of “go test.”
gt [-f] [-l] [arguments for "go test"]
The difference between “gt” and “go test” is that when testing a list of packages, if a package and its dependencies have not changed since the last run, “gt” reuses the previous result.
The -f flag causes gt to treat all test results as uncached, as does the use of any “go test” flag other than -short and -v.
The -l flag causes gt to list the uncached tests it would run.
Cached test results are saved in $CACHE/go-test-cache if $CACHE is set, or else $HOME/Library/Caches/go-test-cache on OS X and $HOME/.cache/go-test-cache on other systems. It is always safe to delete these directories if they become too large.
Gt is an experiment in what it would mean and how well it would work to cache test results. If the experiment proves successful, the functionality may move into the standard go command.
Run (and cache) the strings test:
$ gt strings ok strings 0.436s $
List tests in str... without cached results:
$ gt -l str... strconv $
Run str... tests:
$ gt str... ok strconv 1.548s ok strings 0.436s (cached) $
Force rerun of both:
$ gt -f str... ok strconv 1.795s ok strings 0.629s $