Hello Go community, Official docs recommend putting unit tests in same package as package under test, see: - https://golang.org/doc/faq#How_do_I_write_a_unit_test - https://golang.org/pkg/testing/
Practical experience (see https://medium.com/@matryer/5-simple-tips-and-tricks-for-writing-unit-tests-in-golang-619653f90742#03db) suggests it's better to put tests to a dedicated package so it can test exported API only of the package under test, and if there's value to test the package internals too then put another test suite file to the same package with a special file name to make it clear it's meant to fiddle with internals. Do these suggestions make sense? If so, would it make sense to make them official recommended practice? Maybe in Effective Go? Kind regards, Stevo Slavic. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.