Introduction
Testing helps you check if your Go code works correctly. The testing package makes it easy to write and run tests.
When you want to check if a function returns the right result.
When you fix a bug and want to make sure it stays fixed.
When you add new features and want to confirm they work well.
When you want to run tests automatically before sharing your code.