4 ms·
If you're running through that many conditionals, it may be clearer to work them into a state enum that you can use with a switch.
by 5trokerac3 7y ago
If you're running through that many conditionals, it may be clearer to work them into a state enum that you can use with a switch.
- apta 7y agoGolang doesn't have enums
- 5trokerac3 7y agoNeither does JS, but there are ways to accomplish the same thing[0]. [0] https://stackoverflow.com/questions/14426366/what-is-an-idiomatic-way-of-representing-enums-in-go https://stackoverflow.com/questions/14426366/what-is-an-idio...