]> Cypherpunks repositories - gostls13.git/commit
cmd/go: make 'go version' apply to files
authorRuss Cox <rsc@golang.org>
Tue, 23 Apr 2019 03:30:03 +0000 (23:30 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 26 Apr 2019 13:52:01 +0000 (13:52 +0000)
commit216797b63bb3d2f54c32a968d63857d75895113e
treef5ba2110eb0bd4faf83b2750ce356394675f9762
parentd6b06f025475d62c9d4615d23b463af4395b0c23
cmd/go: make 'go version' apply to files

Expand "go version" from printing just the version of the
go command itself to being able to print the version of any
go binary (when listed on the command line).

This is a simplified version of rsc.io/goversion, which will
now be deprecated in favor of "go version".

(Preparatory changes to runtime, cmd/go, and cmd/link
made this version information easier to find, allowing a
much simpler implementation than in rsc.io/goversion.)

Fixes #31624.

Change-Id: I5f6f5b8392ce86a617e32ce287f6bf2aceafccff
Reviewed-on: https://go-review.googlesource.com/c/go/+/173343
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/alldocs.go
src/cmd/go/internal/version/exe.go [new file with mode: 0644]
src/cmd/go/internal/version/version.go
src/cmd/go/testdata/script/version.txt [new file with mode: 0644]