andrewkroh / gvm

Go Version Manager (written in Go for cross-platform usability)
Apache License 2.0
195 stars 24 forks source link

support use other download url #26

Closed ykfq closed 2 years ago

ykfq commented 4 years ago

For some reason I'm not able to reach the default site https://golang.org, but https://golang.google.cn is ok.

 # gvm install go1.14.9
[g] URL "https://golang.org/dl/" is unreachable ==> Get https://golang.org/dl/: EOF

So is it possible to set the download url BEFORE install ?

andrewkroh commented 4 years ago

We could add support for setting the base URL via an environment variable like GVM_DOWNLOAD_URL. Would that work for you?

andrewkroh commented 2 years ago

There has been --url flag to override the default download URL since 2018 when #12 was added . The default is https://storage.googleapis.com/golang.

Optional flags:
  -h, --help                   Show context-sensitive help (also try --help-long and --help-man).
  -d, --debug                  Enable debug logging to stderr.
      --os=OS                  Go binaries target os.
      --arch=ARCH              Go binaries target architecture.
      --home=HOME              GVM home directory.
      --url=URL                Go binaries repository base URL.
      --repository=REPOSITORY  Go upstream git repository.
      --version                Show application version.