I am wondering what code will be compiled into the go binary if you compile a binary using go build ./...
. This will compile a binary that has a cli program. For this cli program, I have test code and non test code. I currently have several flavours of test code:
-
foo_test.go
in packagefoo_test
-
foo_internal_test.go
in packagefoo
-
testutil.go
in packagetestutil
that provides test utility functions
No test code is actually referenced in the non test code. The testutil functions are only imported in the test files.
If the test code is infact compiled into the binary , how much of a problem is this?