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/tools/cmd/godoc: single file examples are not displayed in package main like godoc.org #31669

Open
nhooyr opened this issue Apr 25, 2019 · 3 comments

Comments

Projects
None yet
4 participants
@nhooyr
Copy link
Contributor

commented Apr 25, 2019

see golang/gddo#132

This issue was never fixed in the godoc tool.

Compare https://godoc.org/nhooyr.io/websocket#ex-package--Echo

Screen Shot 2019-04-24 at 11 19 30 PM

to locally

Screen Shot 2019-04-24 at 11 19 51 PM

@dmitshur dmitshur changed the title cmd/godoc: single file examples are not displayed in package main like godoc.org x/tools/cmd/godoc: single file examples are not displayed in package main like godoc.org Apr 25, 2019

@gopherbot gopherbot added this to the Unreleased milestone Apr 25, 2019

@LaPingvino

This comment has been minimized.

Copy link

commented Apr 26, 2019

I just found this issue when I got pinged because of issue golang/gddo#614, maybe a good idea to try to fix these together... Probably just applying the patch in issue golang/gddo#132 could solve this issue, but the other issue might still be present by doing this. I might give this one a go in the next few hours...

@LaPingvino

This comment has been minimized.

Copy link

commented Apr 30, 2019

Copying over my question in the gddo-issue: does anyone know why the Play method strips comments? Could this be changed to enable the fix for gddo to be backported to the godoc implementation and have expected comment-behavior?

@dmitshur

This comment has been minimized.

Copy link
Member

commented Apr 30, 2019

maybe a good idea to try to fix these together

The plan is to indeed try to fix these together as part of the effort to unify Go package documentation rendering and adding module support to x/tools/cmd/godoc and gddo (issue #26827).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.