Skip to content

Commit

Permalink
cmd/go: explain versions better
Browse files Browse the repository at this point in the history
Summarize the desiderata for selecting versions of remote packages to get.
Fixes #3394.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5902058
  • Loading branch information
robpike committed Mar 26, 2012
1 parent bfdc45a commit 6421bde
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/cmd/go/doc.go
Expand Up @@ -225,7 +225,15 @@ The -u flag instructs get to use the network to update the named packages
and their dependencies. By default, get uses the network to check out
missing packages but does not use it to look for updates to existing packages.
TODO: Explain versions better.
When checking out or updating a package, get looks for a branch or
tag that matches the locally installed version of Go. If the local
version "is release.rNN", it searches for "go.rNN". (For an
installation using Go version "weekly.YYYY-MM-DD", it searches for a
package version labeled "go.YYYY-MM-DD".) If the desired version
cannot be found but others exist with labels in the correct format,
get retrieves the most recent version before the desired label.
Finally, if all else fails it retrieves the most recent version of
the package.
For more about specifying packages, see 'go help packages'.
Expand Down
10 changes: 9 additions & 1 deletion src/cmd/go/get.go
Expand Up @@ -36,7 +36,15 @@ The -u flag instructs get to use the network to update the named packages
and their dependencies. By default, get uses the network to check out
missing packages but does not use it to look for updates to existing packages.
TODO: Explain versions better.
When checking out or updating a package, get looks for a branch or
tag that matches the locally installed version of Go. If the local
version "is release.rNN", it searches for "go.rNN". (For an
installation using Go version "weekly.YYYY-MM-DD", it searches for a
package version labeled "go.YYYY-MM-DD".) If the desired version
cannot be found but others exist with labels in the correct format,
get retrieves the most recent version before the desired label.
Finally, if all else fails it retrieves the most recent version of
the package.
For more about specifying packages, see 'go help packages'.
Expand Down

0 comments on commit 6421bde

Please sign in to comment.