External testing checks a Go package from the user’s point of view, so tests can access only exposed declarations. Place the tests in a {packagename}_test package in the same folder. section 2.1.2
Use external testing to:
- Verify the package’s stable, exposed API rather than its unexposed implementation details. section 2.1.2 section 4.0
- Keep external and internal tests complementary: external tests check exposed behavior, while internal tests can reach unexposed functions. section 2.1.2
