go-misc: github.com/aclements/go-misc/gover Files

Command gover

Command gover manages saved Go build trees.

gover saves builds of the Go source tree and runs commands using these saved Go versions. For example,

git checkout go1.5.1
gover build 1.5.1

will checkout Go 1.5.1, build the source tree, and save it under the name "1.5.1", as well as its commit hash (f2e4c8b). You can then later run commands with Go 1.5.1. For example, the following will run "go install" using Go 1.5.1:

gover 1.5.1 install


gover [flags] save [name]

Save current build under it's commit hash and, optionally, as "name".

gover [flags] build [name]

Like "save", but first run make.bash in the current tree.

gover [flags] <name> <args>...

Run "go <args>..." using saved build <name>. <name> may be an unambiguous commit hash or an explicit build name.

gover [flags] with <name> <command>...

Run <command> with PATH and GOROOT for build <name>.

gover [flags] env <name>

Print the environment for running commands in build <name>. This is printed as shell code appropriate for eval.

gover [flags] list

List saved builds.

gover [flags] gc

Clean the deduplication cache. This is useful after removing saved builds to free up space.


To build and save all versions of Go:

git clone https://go.googlesource.com/go && cd go
for tag in $(git tag | grep '^go[0-9.]*$'); do
  git checkout $tag && git clean -df && gover build ${tag##go}

Package Files

cache.go gover.go shutil.go

Package main imports 17 packages (graph). Updated 2017-12-31. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).