On Thu, Feb 1, 2018 at 3:46 AM Alex Buchanan <[email protected]>
wrote:

Put this line into any of the package *_test.go files:

        func use(...interface{}) {}

When disabling some code in non-test files leads to unused variables foo
and baz error, insert `use(foo, bar)` there to keep the compiler happy. You
cannot forget the use invocation in production code as it is defined only
when `go test` is building the program.

I have it included in my all_test
<https://github.com/cznic/sqlite2go/blob/61fcf16b9b8d7169b4f5fade04543b062246acb1/all_test.go#L46>.go
template.
-- 

-j

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to