There's no text preprocessing in Go. Like Java and others like it, if I want to remove a block of code I can use a const
value and surround the code with an if
.
If I do this, does the compiler optimise the code from the AST and out of the generated code? Or is the condition executed each time?
EDIT: If I want to replicate #ifdef
what's the best way to do it?