go-nv / goenv

:blue_car: Like pyenv and rbenv, but for Go.
https://github.com/go-nv/goenv
MIT License
2.01k stars 245 forks source link

goenv install timeout #251

Open fakeyanss opened 1 year ago

fakeyanss commented 1 year ago

I am maintained in China. And you know the network in China is not stable to access to golang.org.

I found the file in plugins/go-build/share/go-build/{versions}. And I can download golang package after I replace the url of if. (file path: for installation by homebrew: /opt/homebrew/Cellar/goenv/HEAD-xxx/plugins/go-build/share/go-build for installation by manual: ~/.goenv/plugins/go-build/share/go-build )

eg:

install_darwin_arm "Go Darwin arm 1.19.0" "https://golang.org/dl/go1.19.darwin-arm64.tar.gz#859e0a54b7fcea89d9dd1ec52aab415ac8f169999e5fdfb0f0c15b577c4ead5e"

replace to

install_darwin_arm "Go Darwin arm 1.19.0" "https://go.dev/dl/go1.19.darwin-arm64.tar.gz#859e0a54b7fcea89d9dd1ec52aab415ac8f169999e5fdfb0f0c15b577c4ead5e"

Lastly, is there some way to set a env variable of installation mirror, or replace golang.org to go.dev formally in this project?

ps: golang official website has been migrated from golang.org to go.dev.

ghost commented 1 year ago

There is a PR to do this #218 that's sitting open