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

go/doc: Mix of unexported and exported fields leads to spurious blank lines in godoc #20061

Closed
alercah opened this issue Apr 21, 2017 · 1 comment

Comments

@alercah
Copy link

alercah commented Apr 21, 2017

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

N/A (production version of godoc.org)

What operating system and processor architecture are you using (go env)?

N/A

What did you do?

My package's [City][https://github.com/alercah/wonderbot/blob/master/wonders/city.go#L19] struct contains a mix of exported and unexported fields, arranged logically rather than grouping the exported fields together.

In the [documentation][https://godoc.org/github.com/alercah/wonderbot/wonders#City], blank lines are generated in between exported fields when an unexported field intervenes.

Similarly, [Action][https://github.com/alercah/wonderbot/blob/master/wonders/action.go#L8] has one unexported field, at the beginning of the struct. The [documentation][https://godoc.org/github.com/alercah/wonderbot/wonders#Action] includes a blank line at the start of the struct.

What did you expect to see?

There should be no blank lines in the godoc version of the struct. Alternatively, if this is a style rule, there should be a lint check for it

@dsnet
Copy link
Member

dsnet commented Apr 21, 2017

Thanks for filing. This is a dupe of #18264

@dsnet dsnet closed this as completed Apr 21, 2017
@golang golang locked and limited conversation to collaborators Apr 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants