On Wed, 2021-03-24 at 18:31 -0700, Scott Pakin wrote:
> I just noticed that some of the package comments in the standard
> library are coming from the wrong source file. Here are two examples
> from a
golang.org/pkg/ screenshot:
>
>
> In the case of the former, src/os/exec/read3.go appears to be missing
> a newline between the package comment and package, and in the case of
> the latter, src/runtime/mkduff.go appears to be the file at fault.
>
> Do I need to file a bug report, or is this a simple enough issue that
> one of the developers can just make a quick pass through the source
> code, adding the missing blank lines?
>
> — Scott
Some of them appear to be due to godoc ignoring +build directives. For
example, the crypto/x509 package has "Generates root_ios.go." which
it's getting from here
https://golang.org/src/crypto/x509/root_ios_gen.go. go/doc has a
similar problem from
https://golang.org/src/go/doc/headscan.go, and
go/types from
https://golang.org/src/go/types/gotype.go...
In fact all of the ones I looked at appear to be due to this.
Dan