<viennaos/net>
Home
Go
golang enum best practice
golang enum best practice
Use const block to define the enum values.
Create a new type to represent the enum.
Add a method to the enum type to provide a string representation of the enum value.