Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
go/doc: comments dropped from interior of interface definition #10858
The go doc output is missing some important comments from the definition of reflect.Type (so is godoc, but maybe go doc can do better). I've added the missing comments, bracketed by **, below. It's dropping anything that doesn't immediately precede a method definition.
changed the title from
cmd/doc: comments dropped from interior of interface definition
go/doc: comments dropped from interior of interface definition
May 15, 2015
There's currently no way to represent/attach blocks of non-contiguous comments (w/o empty lines between them) to fields (which is what go doc, godoc, etc. are relying on for this). At cheap solution would be to make such comments contiguous by "connecting them" via an empty line comment, but that would change the original source in undesirable ways (it would require some nasty context-sensitive hackery in the go/parser). This could be improved upon by allowing ast.Comments to represent empty lines. However, a lot of code makes the assumption that ast.Comment.Text is never empty, so that's probably not an easy change to make.
Overall, too late for Go 1.9.
Should make this higher priority for Go 1.10.