Go Enum

Open-source Go projects categorized as Enum

Top 10 Go Enum Projects

  1. go-enum

    An enum generator for go

    Project mention: Enums in Go | news.ycombinator.com | 2024-07-12

    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.

  2. 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.

    InfluxDB logo
  3. enumer

    A Go tool to auto generate methods for your enums (by dmarkham)

    Project mention: Goenums: Type Safe Enum Generator for Go | news.ycombinator.com | 2025-04-26
  4. enum

    Type safe enums for Go without code generation or reflection (by orsinium-labs)

    Project mention: Enums in Go | news.ycombinator.com | 2024-07-12
  5. genesis

    All generic functions for Go you ever need! (by life4)

  6. flagvar

    A collection of CLI argument types for the Go `flag` package.

  7. enum

    Elegant and powerful Go enums with zero code generation (by xybor-x)

    Project mention: Go Enum’s problems and solutions with xybor-x/enum | dev.to | 2024-12-11

    The xybor-x/enum libray provides elegant, easy-to-use, and powerful solutions for Go enum with no code generation.

  8. valor

    Go option and result types that optionally contain a value (by phelmkamp)

    Project mention: Three Ways to Think About Go Channels | news.ycombinator.com | 2024-06-26

    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)`>

  9. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  10. go-enum-encoding

    Generate Go enum encoding

    Project mention: Enums in Go | news.ycombinator.com | 2024-07-12

    +1. Here is another alternative. I find this generator more lightweight and better syntax:

    https://github.com/nikolaydubina/go-enum-encoding

  11. go-enumer

    ✨ Go-Enums with Magic ✨

  12. go-enum-example

    Go Enum: benchmarks, examples, analysis

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

Go Enum discussion

Log in or Post with

Go Enum related posts

  • Enums in Go

    6 projects | news.ycombinator.com | 12 Jul 2024
  • Flume/enthistory - History Tables For Ent

    3 projects | /r/golang | 15 Mar 2023
  • Enums?

    1 project | /r/golang | 8 Feb 2023
  • Why no enums?

    2 projects | /r/golang | 10 Nov 2022
  • Does Go not have enums in the sense that I can use them as a type?

    4 projects | /r/golang | 12 Oct 2022
  • How to do Enums in Go

    2 projects | /r/golang | 8 May 2021
  • A note from our sponsor - InfluxDB
    www.influxdata.com | 12 Jun 2025
    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 →

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

Sponsored
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.
www.influxdata.com

Did you know that Go is
the 4th most popular programming language
based on number of references?