There are a lot of if conditions for checking the type of Color which makes it very hard to read and debug. A switch case will improve readability and help to debug much better.
For example box.go#L192 is long, and with a switch case, it can be done much more efficiently.
There are a lot of if conditions for checking the type of
Colorwhich makes it very hard to read and debug. A switch case will improve readability and help to debug much better.For example box.go#L192 is long, and with a switch case, it can be done much more efficiently.