We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Go version go version go1.24.0 windows/amd64
What did I do and see happen? Normally, if an enumerated type is created in Go (using a code snippet in Web):
package main import "fmt" const ( ENUMERATED_VALUE_1 = iota ENUMERATED_VALUE_2 = iota ENUMERATED_VALUE_3 = iota ENUMERATED_VALUE_4 = iota )
, which doesn't have a name.
What did I expect to see? Enumerated types (enums) can be declared natively by the language like this:
type Enumeration enum { ENUMERATED_VALUE_1, ENUMERATED_VALUE_2, ENUMERATED_VALUE_3, ENUMERATED_VALUE_4, }
, rather than using constants and 'iota', like enums in C.
The text was updated successfully, but these errors were encountered:
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
Sorry, something went wrong.
Closing as a dup of #19814.
No branches or pull requests
Go version
go version go1.24.0 windows/amd64
What did I do and see happen?
Normally, if an enumerated type is created in Go (using a code snippet in Web):
, which doesn't have a name.
What did I expect to see?
Enumerated types (enums) can be declared natively by the language like this:
, rather than using constants and 'iota', like enums in C.
The text was updated successfully, but these errors were encountered: