You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
This is a proposal so that when installing binaries via the go modules, the program is able to read and display information about the installed version of the program in a standardized manner if it's installed via go get path@version.
What version of Go are you using (go version)?
go version go1.11 darwin/amd64
What did you do?
Install a binary at a particular version. To work-around #24250, install it via a temporary go module:
mkdir test
cd test
mod init test
go get github.com/go-task/task@v2.0.3
go get github.com/go-task/task/cmd/task@v2.0.3
task --version
What did you expect to see?
I did not expect to see this, but I would like for it to become possible for an application to access and display version information when installed via go get through some standardized mechanism:
For consistency reasons, the implementation should perhaps be similar to that of the runtime.GOOS and runtime.GOARCH constants. SCM information and other metadata except for the version, e.g. the module name, could optionally be exposed.
Please answer these questions before submitting your issue. Thanks!
This is a proposal so that when installing binaries via the go modules, the program is able to read and display information about the installed version of the program in a standardized manner if it's installed via
go get path@version
.What version of Go are you using (
go version
)?What did you do?
Install a binary at a particular version. To work-around #24250, install it via a temporary go module:
What did you expect to see?
I did not expect to see this, but I would like for it to become possible for an application to access and display version information when installed via
go get
through some standardized mechanism:What did you see instead?
Output from --version
Implementation
For consistency reasons, the implementation should perhaps be similar to that of the
runtime.GOOS
andruntime.GOARCH
constants. SCM information and other metadata except for the version, e.g. the module name, could optionally be exposed.https://golang.org/pkg/runtime/#pkg-constants
The discussion on #26420 may be relevant.
The text was updated successfully, but these errors were encountered: