You’re right, Go doesn’t have a built-in enum type like some other languages, but you can use iota to create a similar pattern for constants. It’s a bit of a workaround, but it works pretty well for many use cases where you’d typically use an enum in other languages.
You’re right, Go doesn’t have a built-in enum type like some other languages, but you can use iota to create a similar pattern for constants. It’s a bit of a workaround, but it works pretty well for many use cases where you’d typically use an enum in other languages.