While prototyping a library to work around #13656, I ran in to a pretty major issue with the godoc tool. It doesn't generate any documentation at all for packages whose tests use cgo, which implies that packages designed for use with cgo cannot contain idiomatic examples.
bcmills:~/src$ go version
go version devel +b53acd89db Tue May 16 17:15:11 2017 +0000 linux/amd64
bcmills:~/src$ go tool doc cslice
doc: use of cgo in test /usr/local/google/home/bcmills/src/cslice/cslice_test.go not supported
So the root problem, which is implied by the build.Package documentation, seems to be that a file is expected to appear in exactly one of GoFiles, CgoFiles, TestGoFiles, XTestGoFiles, or IgnoredGoFiles.
Adding support for Cgo in tests appears to involve adding TestCgoFiles and XTestCgoFiles to build.Package, and then teaching src/cmd/go/internal/load/test.go about these fields. I'm going to take a stab at this.