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 use 
(mainly connecting to a DB). For testing purposes, I have a mock 
initialization routine. However, that initialization routine needs to 
modify private variables, so I can't move it into test/. Is there any way 
around this that avoids including the mock code in my production binary?

Sincerely,

Alex Becker

-- 
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.

Reply via email to