6 ms·
Right, the builtin switch statement is not exhaustive but you can quite easily create a Switch method on your enum type in Go 1.18+ that is exhaustive.
by Splizard 4y ago
Right, the builtin switch statement is not exhaustive but you can quite easily create a Switch method on your enum type in Go 1.18+ that is exhaustive.