I am new to Go and I wanted to know why isn’t there a command like go update to update the current version of the language to the latest version. What I found after my search is that each time you want to update the version of Go you have to do the same process manually (sometimes you remove the current version and install the newest version again).
I have a background in Rust, and in there is a simple command to update the version with just typing on your terminal:
rustup update
I really would like to know if there is a way to do the same thing in Go?
It’s not build in rust either. Rustup is an external version manager, coincidentally maintained by the same foundation. But it’s not part of the language or the language toolchain.
I know, but it’s battery included. You don’t need that hassle to manually install a newer Go version each time. when I installed Go 1.18 I had to do a lot of work including removing the current version manually using ‘rm’.
What I think it’s appropriate is to include this to the ecosystem, I think it’s better
As a polyglot I prefer a unified tool anyway a lot over having to use yet another version manager for each language.
Asdf and nix serve this purpose well. There is in my opinion no need to bind resources for yet another new shiny thing.
I agree though, that without a version manager the install, upgrade and uninstall stories are not nice. Proper DEB and RPM should be provided, if not timely updated repositories.
I’ve never really cared much that Go doesn’t have a dedicated package manager for the Go binaries, since every OS I use has a package manager that bundles Go for me. I did some searching to see if anybody was creating proposals for this and found nothing, so I’m assuming it’s not on most people’s radar. That said, I could see how it would be useful for some people.