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

proposal: cmd/go: enable remote import path wildcards #54530

Open
willfaught opened this issue Aug 18, 2022 · 0 comments
Open

proposal: cmd/go: enable remote import path wildcards #54530

willfaught opened this issue Aug 18, 2022 · 0 comments
Labels
Milestone

Comments

@willfaught
Copy link
Contributor

willfaught commented Aug 18, 2022

The go command documentation says if you want import "example.com/pkg" to work for https://github.com/myuser/pkg, you have to put <meta name="go-import" content="example.com/pkg git https://github.com/myuser/pkg"> in the HTML for https://example.com/pkg and https://example.com.

It seems you have to do this for each package, which is painful, especially if example.com serves static content, like a Hugo site on GitHub Pages.

There should be a way to have a single meta tag like <meta name="go-import" content="example.com/* git https://github.com/myuser/*"> in the site root's HTML that acts as a wildcard for any import path.

I guess you could have things like fallbacks too:

<meta name="go-import" content="example.com/pkg git https://github.com/myuser/pkg">
<meta name="go-import" content="example.com/* git https://github.com/someotheruser/*">
@gopherbot gopherbot added this to the Proposal milestone Aug 18, 2022
@ianlancetaylor ianlancetaylor moved this to Incoming in Proposals Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Incoming
Development

No branches or pull requests

2 participants