> We can use a switch with an integer which Go can optimize into a jump table.<p>I wasn't aware that golang switch statements were ever turned into jump tables. But then again, maybe they will be soon?<p><a href="https://go-review.googlesource.com/c/go/+/357330/" rel="nofollow">https://go-review.googlesource.com/c/go/+/357330/</a>