Go Unit Tests and Benchmarks
摘要
Doing frequent and comprehensive unit testing of your code is best practice. Having repeatable (and automated) tests to use for regression testing after changes is also best practice. A style of development, called test-driven development, emphasizes creating all test cases before any code under test is created.