[Contribution] Go_Updater shellscripting (GNU/Linux or WSL)

89 views
Skip to first unread message

Walddys Emmanuel Dorrejo Céspedes

unread,
Apr 11, 2023, 10:00:13 AM4/11/23
to golang-nuts

hello, i did this Bash Script (only Linux/WSL) to update GoLang, it will give you some options, like update to the next patch (1.20.x) or the next minor version (1.21) only stable ones (not beta neither rc), if someone found useful, here is the link: https://gitlab.com/wedc-scripts/go_updater.

it respect the user environment, if Golang home is in other location, it will respect that, it will work in base of go env.

Brian Candler

unread,
Apr 11, 2023, 10:31:45 AM4/11/23
to golang-nuts
Something to consider: if you untar over an existing installation, then it's possible you will be left with stale artefacts - e.g. source files that were in an old version that aren't in the new one. I've been bitten by this in other projects.

I haven't been bitten by this in Go, but I always mv or rm the old /usr/local/go our of the way before untarring a fresh one to avoid the possibility.

Walddys Emmanuel Dorrejo Céspedes

unread,
Apr 12, 2023, 2:20:12 PM4/12/23
to golang-nuts
Hello, the script does that, i created in base of go.dev recommendation, it will not remove the folder, but delete all the content.
Reply all
Reply to author
Forward
0 new messages