Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go: support URL Redirection in "go get" from custom to known import path? #19760
What version of Go are you using (
We did follow the redirect, and then fetched https://github.com/garethwarry/test?go-get=1 which didn't have go-import meta tags.
You want to be able to redirect from a custom import path to a known import path (like github) and then have us recognize that pattern?
That seems too convoluted to be worth both testing and documenting the precedence rules.
If you control warry.io, why don't you just serve the expected (and documented) format? (especially at least when Go says "?go-get=1").
changed the title from
URL Redirection in "Go Get" Command
cmd/go: support URL Redirection in "go get" from custom to known import path?
Mar 29, 2017
Well, it seems that by following the redirect, the go get command does get the meta tags for the known import path. The problem is that it then checks that known path against the custom import path and actively rejects it. It would be nice if that could be ignored by a flag or something. I'm not exactly sure of the purpose of that check to begin with.