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

cmp: Reporter's use of anonymous interface argument creates poor display output in godoc #135

Closed
mdlayher opened this issue Mar 22, 2019 · 6 comments

Comments

Projects
None yet
3 participants
@mdlayher
Copy link

commented Mar 22, 2019

As of now, the index section on a local godoc -http instance and on https://godoc.org/github.com/google/go-cmp/cmp makes the Reporter link appear as such:

Selection_016

This is pretty unfortunate, but I'm not sure if the correct answer is to fix godoc, give this interface a proper type, or perhaps both. I didn't file an issue on golang/go as of yet because I'm not sure what the best path forward is.

@mdlayher mdlayher changed the title cmp: Reporter's use of anonymous interface argument breaks godoc index cmp: Reporter's use of anonymous interface argument creates poor display output in godoc Mar 22, 2019

@dsnet

This comment has been minimized.

Copy link
Member

commented Mar 22, 2019

I would say that this is a bug with github.com/golang/gddo, which is the service that runs godoc.org. The unfortunate problem with godoc is that there are many implementations, and they unfortunately share little code, so fixing this in one place needs to be replicated again in another. It's been a long-term goal of mine to unify the godocs, but one can only do so much.

For example, the problem that you are describing is fixed in the go doc commandline tool:

$ go doc | grep Reporter
    func Reporter(r interface{ ... }) Option

but is clearly not addressed in gddo (which BTW, is a different project from github.com/golang/tools/godoc).

@dsnet

This comment has been minimized.

Copy link
Member

commented Mar 22, 2019

\cc @dmitshur

@mdlayher

This comment has been minimized.

Copy link
Author

commented Mar 22, 2019

I see! It does seem to be reproducible for me on https://github.com/golang/tools/tree/master/godoc as well, but perhaps the two projects share some code somewhere that is causing this. Thanks for clarifying though.

@dsnet

This comment has been minimized.

Copy link
Member

commented Jun 10, 2019

Going to close this since the problem is fundamentally with godoc. @dmitshur and I hopefully to address some godoc issues in the next quarter or two.

@dsnet dsnet closed this Jun 10, 2019

@dmitshur

This comment has been minimized.

Copy link
Member

commented Jun 10, 2019

@dsnet Do we have an upstream issue for x/tools/cmd/godoc (or a lower-level component) for this, so we don't lose track of it? (We don't need a separate one for gddo.)

@dsnet

This comment has been minimized.

Copy link
Member

commented Jun 10, 2019

Done. golang/go#32532

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.