Skip to content
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

x/pkgsite: surface VCS clone path from the go-import meta tag #46243

mvdan opened this issue May 18, 2021 · 4 comments

x/pkgsite: surface VCS clone path from the go-import meta tag #46243

mvdan opened this issue May 18, 2021 · 4 comments


Copy link

@mvdan mvdan commented May 18, 2021

Take, for example:

$ curl
<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="go-import" content=" git">
<meta name="go-source" content="{/dir}{/dir}/{file}#L{line}">
<meta http-equiv="refresh" content="0; url=">
<a href="">Redirecting to documentation...</a>

If I go to, the only link I see is, which is fine for browsing the source - but not for git clone, as github is just a mirror. I should be using for that, but pkgsite doesn't make that evident.

I get that perhaps this is an internal detail that most people shouldn't need to be aware of, but it's still relevant for peoplel wishing to contribute to a module. Especially for the x repos hosted by Gerrit - I seem to recall that you have to clone from the right URL for git-codereview to work properly.

@gopherbot gopherbot added this to the Unreleased milestone May 18, 2021
Copy link

@bcmills bcmills commented May 18, 2021

(Compare #18387 for cmd/go.)

Copy link

@bcmills bcmills commented Aug 4, 2021

It may be that pkgsite itself doesn't have this information at the moment. (We may need #44742 for that.)

Copy link

@dmitshur dmitshur commented Aug 4, 2021

I've closed #47520 as a duplicate of this issue.

Copy link

@shellscape shellscape commented Oct 7, 2021

Please resurface that meta tag, as it was infinitely useful for anyone performing insight on their imports. Vanity paths have no other means of gleaning information on the repo other than to scrape HTML. Combined with the lack of an API to provide package metadata, the new site and forced redirect cripple consumer insight into packages.

I'd also suggest placing any other useful information into meta tags in lieu of an API. That's at least somewhat functional and quasi-contractual.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants