[go-nuts] Re: Test code that interacts with private variables and doesn't bloat binary

2017-01-17 Thread alcubecker
Ah, then my fundamental structure was wrong. Since the code didn't contain any tests, I had it in a file named init_mock.go, and it was getting pulled into the binary. So you're saying I should have all test-only code in a file named *_test.go, including code that doesn't contain any tests? On

[go-nuts] Test code that interacts with private variables and doesn't bloat binary

2017-01-16 Thread alcubecker
I'm trying to test my packages without bloating the size of the binary. Currently this consists of moving the test code into a test/ subdirectory. If there's a better way to handle this, e.g. tree-shaking, please let me know. Unfortunately, I have a package that needs to be initialized before u