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: broken source links in autogenerated API docs #38205

Closed
seehuhn opened this issue Apr 1, 2020 · 4 comments
Closed

x/pkgsite: broken source links in autogenerated API docs #38205

seehuhn opened this issue Apr 1, 2020 · 4 comments

Comments

@seehuhn
Copy link

@seehuhn seehuhn commented Apr 1, 2020

What is the URL of the page with the issue?

https://pkg.go.dev/seehuhn.de/go/websocket?tab=doc

What is your user agent?

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36

Screenshot

Screenshot 2020-04-01 at 22 26 13

What did you do?

I clicked on the blue Conn shown at the top of the screenshot.

What did you expect to see?

I hoped to reach the source code of Conn.

What did you see instead?

The link led to https://github.com/seehuhn/go-websocket.git/blob/v1.0.0/conn.go#L38, but this page does not exist so the browser showed an 404 error message. The problem can be fixed by changing go-websocket.git to go-websocket in the URL.

@gopherbot gopherbot added this to the Unreleased milestone Apr 1, 2020
@gopherbot gopherbot added the pkgsite label Apr 1, 2020
@julieqiu julieqiu added the NeedsFix label Apr 6, 2020
@julieqiu
Copy link
Contributor

@julieqiu julieqiu commented Apr 6, 2020

Thanks for the feedback, @seehuhn! We will work on a fix for this. Related: #37819

@julieqiu julieqiu changed the title go.dev: broken source links in autogenerated API docs x/pkgsite: broken source links in autogenerated API docs Jun 15, 2020
@shaqque
Copy link
Contributor

@shaqque shaqque commented Jun 29, 2020

It looks like this is a problem with the meta tag at https://www.seehuhn.de/go/websocket?go-get=1:

<meta name="go-import" content="seehuhn.de/go/websocket git https://github.com/seehuhn/go-websocket.git">

In particular, note the output of go help importpath specifies that

The meta tag has the form:

<meta name="go-import" content="import-prefix vcs repo-root">

...
The repo-root is the root of the version control system containing a scheme and not containing a .vcs qualifier.
(emphasis added)

@shaqque
Copy link
Contributor

@shaqque shaqque commented Jul 1, 2020

I've filed an issue upstream in seehuhn/go-websocket#1. Closing this issue in favor of that one. Feel free to comment on this issue again or open a new one if the problem has not been resolved.

@shaqque shaqque closed this Jul 1, 2020
@seehuhn
Copy link
Author

@seehuhn seehuhn commented Jul 24, 2020

Thank you for your feedback. I will change the meta tags on my site, so the problem should be solved.

Nevertheless, I just want point out that the corresponding link on godoc.org works even with my current meta tag (click the "Conn" link at https://godoc.org/seehuhn.de/go/websocket#Conn to see this). So in a sense, one could see this change as a regression.

@julieqiu julieqiu modified the milestones: Unreleased, pkgsite/dochtml Aug 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants