Closed mewmew closed 7 years ago
Wow, this is another good find. Goggles already uses go/build
actually so I'm a little surprised this isn't already handled, but I'll dig into it some more and see if there's anything I may have missed in the docs.
Actually that's not true - Goggles uses KyleBanks/depth which uses go/build
so I may have to make the change over there.
Resolved by c080d80ef179b30eeda405c9b7726535e40c8027
This issue may be difficult to reproduce, however I'll try to describe the observed behaviour of goggles.
The ir package of llir/llvm uses
go generate
to run thegen.go
source file, to generating the source code of binary and bitwise instruction data representations.When viewing the documentation for llir/llvm/ir the documentation of
package ir
is sometimes displayed, and sometimes, the documentation ofpackage main
is displayed.Note, that gen.go contains a
//+build ignore
tag, which I think is what makes godoc skip this file when generating documentation. As a user of goggles, I would expect these kind of files to be ignored, so that the relevant documentation is displayed.It may be worth taking a look at, and potentially using the go/build package which provides native support for handling build tags (along with support for dealing with multiple GOPATHs).