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

Comments inside func defitions are rendered in the index #633

zegl opened this issue Jul 20, 2019 · 1 comment


Copy link

@zegl zegl commented Jul 20, 2019

Go allows for comments inside the function definition in some cases, like the following example:

func Foo(r interface {
	// Comment about this function
})  {

One example where this is used is in the go-cmp package.

When the documentation for this package is rendered by gddo, the result is not what I would have expected (live version).

I'll include a screenshot to highlight the issue:

Screen Shot 2019-07-20 at 19 46 31

I would have expected the comments not to be included in the method definition overview, making the end result look like this:

func Reporter(r interface {
}) Option
@zegl zegl changed the title Comments inside type defitions are rendered in the index Comments inside func defitions are rendered in the index Jul 20, 2019

This comment has been minimized.

Copy link

@dmitshur dmitshur commented Oct 31, 2019

This will be resolved in the upcoming Go discovery site, golang/go#33654.

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