gover

command
v0.0.0-...-2f6ede8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2024 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Overview

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,

cd $GOROOT
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

Usage

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.

Recipies

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}
done

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL