Open mdlayher opened 7 years ago
My questions/concerns are:
(as for modelling in go/doc the simplest way would just be to copy the doc string into each Func, but it would be hard to discover the grouping and the decl containing the actual comment without an additional field or method for retrieving the decl with the comment)
I'm not opposed to this change, and I could see it being a benefit, but I'm not convinced it justifies its complexity yet.
@jimmyfrasche Some (possible) answers:
Suggested by @griesemer in another proposal: https://github.com/golang/go/issues/18616#issuecomment-275761203.
An example of the proposed before and after output, for a series of functions called
TrailingZeros
with integer sizes "N" as a suffix:Before:
After:
Seems like a big usability improvement, and would be useful in at least
sync/atomic
as it exists now in the stdlib: https://golang.org/pkg/sync/atomic/. Would also be useful for some of the proposed APIs for amath/bits
as discussed here: https://github.com/golang/go/issues/18616