Bookmark this Go enum solution 🔖
It may look heavy at first, but it covers everything. I often forget that the type safety comes from hiding the string inside a struct, which prevents direct access. With unqualified field syntax, you can still define the values without clutter.
add a skeleton here at some point
2 months ago