Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
zer00eyz
on March 1, 2024
|
parent
|
context
|
favorite
| on:
Go Enums Suck
>>> But what you notice here is we have no string representation of these Enums so we have to build that out next, for this I just use a map[Operation]string and instantiate this with the defined string constants.
Cries in I18N...
mseepgood
on March 1, 2024
[–]
Or just define the constants as string constants in the first place: "type Operation string"
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
Cries in I18N...