libgo: compile examples in _test packages

Previously if the only names defined by _test packages were examples,
the gotest script would emit an incorrect _testmain.go file.
I worked around that by marking the example_test.go files +build ignored.

This CL changes the gotest script to handle this case correctly,
and removes the now-unnecessary build tags.

Change-Id: Ia617877d5f2f0b0e82341b633b4edd965de1daa5
Reviewed-by: Than McIntosh <>
43 files changed