You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And in fact, go get (I tested 1.5.2) appears to do just fine with a vanity import located at the root of a domain. You can try go get goji.io as an example of this behavior.
This originally surfaced as a bug report against godoc.org, which uses similar logic (although it does not actually use the same code): golang/gddo#355. This bug report is, as much as anything, a spec clarification for that project.
The text was updated successfully, but these errors were encountered:
Go 1.4 and earlier also rejected 'go get goji.io'. But the behavior here was inconsistent with the behavior once the source code was checked out, or when naming a subdirectory explicitly. So for Go 1.5 we fixed the inconsistency by allowing domain roots. That was #9357.
x/tools/go/vcs and godoc.org are both just out of date with respect to this fix.
vcs.RepoRootForImportDynamic
requires that all vanity imports contain at least one/
character: https://github.com/golang/tools/blob/c0008c5889c0d5091cdfefd2bfb08bff96527879/go/vcs/vcs.go#L483-L486However, the documentation for vanity imports does not forbid vanity imports that do not contain a
/
(i.e., those at the root of a domain): https://golang.org/cmd/go/#hdr-Remote_import_pathsAnd in fact,
go get
(I tested 1.5.2) appears to do just fine with a vanity import located at the root of a domain. You can trygo get goji.io
as an example of this behavior.This originally surfaced as a bug report against godoc.org, which uses similar logic (although it does not actually use the same code): golang/gddo#355. This bug report is, as much as anything, a spec clarification for that project.
The text was updated successfully, but these errors were encountered: