2 ms·
But you may want to add a compiler flag, or change the path of the binary. If the binary is called in multiple places it does make sense to constantize it.
by kqr 9y ago
But you may want to add a compiler flag, or change the path of the binary. If the binary is called in multiple places it does make sense to constantize it.
- clra 9y agoPossibly, but by moving flags up to the constants you also run the risk of obfuscating things further. A little bit of repetition when it comes to compiler flags (especially in Go where there are relatively few) is a good trade for the added clarity it conveys. Invoking a particular binary is valid, but even there, you only need one constant, not one for every subcommand.
- firethief 9y agoOr stick in a wrapper.