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: lineWrapper does not add // prefix while wrapping a line comment #20929
Comments
Pretty sure this is a bug in go/doc's ToText function. cmd/doc calls that to format comments. |
Hard to see this as a release blocker, though. Demoting to Maybe. |
This is due to This does not happen in To fix this, we need to add logic to @griesemer - Are you okay with this ? In general, are there cases where Also what about block comments ? I have never seen block comments in struct fields, but I guess it is plausible some people can use it. The formatting screws up even further if I use them
|
Whatever lineWrapper is doing, it needs to be aware of whether it's in a comment (and what kind of comment), and do the right thing. Looks like this is clearly a bug that should be addressed. |
Change https://golang.org/cl/163578 mentions this issue: |
Note the "caller" line without a leading //. It should have one.
/cc @robpike
The text was updated successfully, but these errors were encountered: