I sometimes do this but idk if I would consider it 'elegant'
The other 'gotcha' is that in switch statements the compiler can't tell whether you enumerated on all your cases as there is no true enum type so it's not uncommon to have a catch all default case that either returns an error or panics and hope you can catch it during tests if you missed a case.
I just wish go had proper sum types.
This is an analyzer that will catch this: https://github.com/nishanths/exhaustive
I believe it's in golangci-lint.