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

Support go get/go import redirects #510

Open
pombredanne opened this issue Jul 26, 2024 · 0 comments
Open

Support go get/go import redirects #510

pombredanne opened this issue Jul 26, 2024 · 0 comments

Comments

@pombredanne
Copy link
Contributor

For instance: golang.org/x/text is effectively from a git repo at git https://go.googlesource.com/text

The URL at https://golang.org/x/text serves this:

<!DOCTYPE html>
<html lang="en">
<title>The Go Programming Language</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="go-import" content="golang.org/x/text git https://go.googlesource.com/text">
<meta http-equiv="refresh" content="0; url=https://pkg.go.dev/golang.org/x/text">
</head>
<body>
<a href="https://pkg.go.dev/golang.org/x/text">Redirecting to documentation...</a>
</body>
</html>

And go.roman.zone/go-get-redirect is serving this redirect:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="go-import" content="go.roman.zone/go-get-redirect git https://github.com/gentlecat/go-get-redirect.git">
</head>
<body>
See <a href="https://pkg.go.dev/go.roman.zone/go-get-redirect">https://pkg.go.dev/go.roman.zone/go-get-redirect</a> for documentation.
<script type="032e2f5629592120b938c4dd-text/javascript">
      window.location = "https://pkg.go.dev/go.roman.zone/go-get-redirect"
    </script>
<script src="/cdn-cgi/scripts/7d0fa10a/cloudflare-static/rocket-loader.min.js" data-cf-settings="032e2f5629592120b938c4dd-|49" defer></script></body>
</html>

See also:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant