InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now. Learn more →
Top 10 Go Enum Projects
-
There's also https://github.com/abice/go-enum, which I decided to use after evaluating multiple such tools a while ago, but I don't remember exactly why it came out on top for me. Also, both (and others) have evolved since then, so things might have changed.
One nice thing go-enum does is to even generate the consts, just from a list of values in a comment.
-
InfluxDB
InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
-
-
-
-
-
The xybor-x/enum libray provides elegant, easy-to-use, and powerful solutions for Go enum with no code generation.
-
There are type switch statements, at least, and libraries like https://github.com/phelmkamp/valor can use them to provide more concise abstractions. The really frustrating thing is that interfaces can't have methods that introduce new type parameters, so we're stuck with standalone functions like `optional.Map(optionalFoo, barFunc)` instead of `optionalFoo.map(barFunc)`>
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
+1. Here is another alternative. I find this generator more lightweight and better syntax:
https://github.com/nikolaydubina/go-enum-encoding
-
-
Go Enum discussion
Go Enum related posts
-
Enums in Go
-
Flume/enthistory - History Tables For Ent
-
Enums?
-
Why no enums?
-
Does Go not have enums in the sense that I can use them as a type?
-
How to do Enums in Go
-
A note from our sponsor - InfluxDB
www.influxdata.com | 12 Jun 2025
Index
What are some of the best open-source Enum projects in Go? This list will help you:
# | Project | Stars |
---|---|---|
1 | go-enum | 833 |
2 | enumer | 477 |
3 | enum | 424 |
4 | genesis | 349 |
5 | flagvar | 45 |
6 | enum | 36 |
7 | valor | 16 |
8 | go-enum-encoding | 15 |
9 | go-enumer | 13 |
10 | go-enum-example | 11 |