Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal: x/tools/cmd/getgo: document and possibly ship in distributions #27700

Open
jezek opened this issue Sep 16, 2018 · 6 comments

Comments

@jezek
Copy link

commented Sep 16, 2018

Feature request:

Provide a go tool to update go to latest stable version, or to a user selected version.

Examples:

Update go to latest stable version.

go version -update

Replace current version with version 1.x.y

go version -update -v 1.x.y

@ALTree ALTree changed the title FeatureRequest: go tool version update cmd/go: add -update flag to go tool version Sep 16, 2018

@ALTree

This comment has been minimized.

Copy link
Member

commented Sep 16, 2018

The version tool currently has a very narrow scope: it just shows the version of the toolchain it's invoked from. I think it's unlikely it'll be expanded to become an installer.

OTOH, we already have a tool called getgo (https://github.com/golang/tools/tree/master/cmd/getgo) that can be used to install go toolchains. Note that (from its docs):

If Go is already installed via this installer it will upgrade it to the latest version of Go.

which is similar to what you're asking.

@jezek

This comment has been minimized.

Copy link
Author

commented Sep 17, 2018

Thank you for the getgo command, I should have searched harder.

But IMHO this command should be installed by default like gofmt or godoc. Or am I wrong?

@bcmills bcmills added this to the Unplanned milestone Sep 17, 2018

@rsc rsc changed the title cmd/go: add -update flag to go tool version proposal: document getgo and possibly ship in distributions Sep 19, 2018

@rsc

This comment has been minimized.

Copy link
Contributor

commented Sep 19, 2018

go version -update is definitely too difficult. (The go command should not be attempting to overwrite itself.) Changing to a proposal to document and ship getgo.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Sep 19, 2018

/cc @andybons for triage. If no one is available now maybe put on hold.

@agnivade

This comment has been minimized.

Copy link
Member

commented Sep 19, 2018

Shipping getgo is a great idea. From what I see in HN, the community will definitely benefit from this. But there are some pending issues which need attention - #21277, #21533.

Also, note that if one already has a go distribution, it is possible to do go get golang.org/dl/<> to install/update go. Although, it will install in $HOME/sdk and not in /usr/local/go. But ideally, we should promote and use only one tool for installing/updating go.

@andybons andybons self-assigned this Sep 20, 2018

@andybons andybons added Proposal-Hold and removed Proposal labels Oct 10, 2018

@gopherbot gopherbot added the Proposal label Oct 10, 2018

@andybons

This comment has been minimized.

Copy link
Member

commented Oct 10, 2018

Putting on hold for now while we figure out next steps so that proposal committee doesn’t need to see it each week.

@rsc rsc changed the title proposal: document getgo and possibly ship in distributions proposal: x/tools/cmd/getgo: document and possibly ship in distributions Oct 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.