-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: remove go get's hostname check? #19923
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
Comments
I think this is by design throughout |
gitlab1 didn't work out well? :) Did you consider using names like "git.yourcorp.com"? That's more idiomatic Go. |
This has also impacted my workplace. For a local server, the hostname "sw" isn't permitted but is a valid import path for a hosted gitlab server. I would like to see this check and the redirection check on the import path removed. I don't get why there are so many unnecessary checks on "go get". |
If removing dot, the name will be treated as standard package. If you write hostname |
So at present, the only way is use |
Yes, but I can't say for sure if you use anothor tools. |
Most tools is also use |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?1.8.1
What operating system and processor architecture are you using (
go env
)?windows and amd64
What did you do?
When using
go get
command to get a package from private gitlab repo likehttps://gitlab2
, this repo's url not contains.
. Then i got the errorimport path does not begin with hostname
.What did you expect to see?
Can we remove the hostname check? https://github.com/golang/go/blob/master/src/cmd/go/internal/get/vcs.go#L659-L662
What did you see instead?
The text was updated successfully, but these errors were encountered: