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
cmd/go: allow omitting http scheme from GOPROXY #32191
Comments
Change https://golang.org/cl/179217 mentions this issue: |
I agree this inconsistency is annoying and hard to explain. Let's say that a GOPROXY entry (something in the comma-separated list) without :// gets https:// inserted at the front, and let's also say that a leading https:// in GOSUMDB is dropped before the rest of the processing happens. |
One minor wrinkle: we should probably reserve dotless words for special tokens. (Today we have Those will be fine with an explicit |
One more wrinkle: RFC 8089 allows file URIs of the form |
Change https://golang.org/cl/181019 mentions this issue: |
Currently,
GOPROXY
has to be specified as a full URL (https://proxy.golang.org
) whereasGOSUMDB
does not (sum.golang.org
). Without knowing the details of the underlying protocol, this seems like an unnecessary inconsistency that will be easy for people to get wrong.How about allowing
GOPROXY
to be specified without the URL scheme? So:would be treated the same as:
Then in the common case, both
GOPROXY
andGOSUMDB
can be specified in a similar way. The go command would continue to accept a full URL forGOPROXY
so all the original flexibility is still available.The text was updated successfully, but these errors were encountered: