Граф коммитов

5 Коммитов

Автор SHA1 Сообщение Дата
Dmitri Shuralyov 2a37d0d3d7 version: convert to generated copy of golang.org/dl/internal/version
Package version has been copied from golang.org/x/build/version to
golang.org/dl/internal/version as part of golang/go#23223. The old
package was marked deprecated but kept for backwards compatibility
reasons. Fixes and changes have not been backported from the new
dl/internal/version package (to avoid spending time unproductively).

bundle has recently been updated to accept an empty prefix in CL 105515.

This allows one to use bundle to make a generated copy of a package.
A generated copied package is better than a manually-maintained copied
package for the following reasons:

1. Keeping the copied package up to date with upstream is low effort,
   just need to run go generate.

2. It's clear to contributors that the copied package isn't the
   canonical version, since there is a generated comment like
   "// Code generated by golang.org/x/tools/cmd/bundle. DO NOT EDIT."
   at the top of the file. It's easy to reject changes to the copied
   package, or redirect them to the upstream.

Overall, making the copied package generated rather than hand-written
reduces the maintenace cost, and makes it more viable to keep it more
up to date with upstream.

The diff to version.go in this CL is due to some dl/internal/version
CLs being effectively backported by bundle, including CL 134435,
CL 143545, and CL 144698.

Updates golang/go#23223
Fixes golang/go#23635

Change-Id: Id8cd63c52b660b6817e6fdba080373966789e1e8
Reviewed-on: https://go-review.googlesource.com/c/148881
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-12-11 00:39:38 +00:00
Dmitri Shuralyov afa037bc26 version: make golang.org/dl replacement more visible
The golang.org/x/build/version/... packages have been deprecated
in favor of golang.org/dl/... in CL 123678, as part of golang/go#23223.

Make this more visible by pointing to the new packages in the package
documentation.

Use a godoc.org link to avoid confusion, because these import paths
are hard tell apart from normal URLs that have a different meaning.

Updates golang/go#23635.
Updates golang/go#23223.

Change-Id: Ide6371f24fa2369b2807987c83df4226cacfe35d
Reviewed-on: https://go-review.googlesource.com/c/144617
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-10-25 17:45:05 +00:00
Brad Fitzpatrick 46a0bbc43b version: use ProxyFromEnvironment
Thanks to Benjamin Bytheway for pointing out its omission.

Change-Id: Iee53e3d77fe575d1bbde7f3bc0c4693d293857a2
Reviewed-on: https://go-review.googlesource.com/35845
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2017-01-27 06:42:13 +00:00
Chris Broadfoot e5b4098888 version: add a User-Agent to aid analytics on use of this tool
Change-Id: I31f823cd6679255bc3a6341b5e140a91027a2749
Reviewed-on: https://go-review.googlesource.com/34550
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-12-16 22:35:26 +00:00
Brad Fitzpatrick 071a06af6a version: add programs to download & run go1.8beta1 and go1.8beta2
This permits a user with any halfway recent version of Go to run:

   $ go get golang.org/x/build/version/go1.8beta1

   $ go1.8beta1
   go1.8beta1: not downloaded. Run 'go1.8beta1 download' to install to /home/bradfitz/sdk/go1.8beta1

   $ go1.8beta1 download
   Downloaded 0.0% (15225 / 90818333 bytes) ...
   Downloaded 50.1% (45514752 / 90818333 bytes) ...
   Downloaded 100.0% (90818333 / 90818333 bytes).
   Unpacking /home/bradfitz/sdk/go1.8beta1/go1.8beta1.linux-amd64.tar.gz ...
   Unpacked /home/bradfitz/sdk/go1.8beta1/go1.8beta1.linux-amd64.tar.gz.
   Success. You may now run 'go1.8beta1'

   $ go1.8beta1 version
   go version go1.8beta1 linux/amd64

   $ go1.8beta1 run ~/helloworld.go
   Hello, world from go1.8beta1!

Updates golang/go#18136

Change-Id: I4297df19138facbf90dfab790ab30b942151b096
Reviewed-on: https://go-review.googlesource.com/34385
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-12-15 00:27:39 +00:00