go-enum

An enum generator for go (by abice)

Go-enum Alternatives

Similar projects and alternatives to go-enum

  1. go

    2,276 go-enum VS go

    The Go programming language

  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. go-formatter

    A curated list of awesome Go frameworks, libraries and software

  4. githut

    60 go-enum VS githut

    Github Language Statistics

  5. engine

    54 go-enum VS engine

    Discontinued The Flutter engine (by flutter)

  6. goimports

    [mirror] Go Tools (by golang)

  7. exhaustive

    Check exhaustiveness of switch statements of enum-like constants in Go source code.

  8. gotype

    Golang source code parsing, usage like reflect package

  9. Stream

    Stream - Scalable APIs for Chat, Feeds, Moderation, & Video. Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.

    Stream logo
  10. GoWrap

    GoWrap is a command line tool for generating decorators for Go interfaces

  11. enumer

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

  12. goderive

    Derives and generates mundane golang functions that you do not want to maintain yourself

  13. goverter

    Generate type-safe Go converters by defining function signatures.

  14. generis

    Versatile Go code generator.

  15. go-xray

    Helpers for making the use of reflection easier

  16. typeregistry

    create type dynamically in Golang

  17. go-enumer

    ✨ Go-Enums with Magic ✨

  18. go-check-sumtype

    A simple utility for running exhaustiveness checks on Go "sum types."

  19. enum

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

  20. validator

    Package validator implements struct field validations (by go-validator)

  21. go-enum-encoding

    Generate Go enum encoding

  22. SaaSHub

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

    SaaSHub logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better go-enum alternative or higher similarity.

go-enum discussion

Log in or Post with

go-enum reviews and mentions

Posts with mentions or reviews of go-enum. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-07-12.
  • Enums in Go
    6 projects | news.ycombinator.com | 12 Jul 2024
    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.

  • Ten Years of “Go: The Good, the Bad, and the Meh
    5 projects | news.ycombinator.com | 18 Jul 2023
    While not perfect, there are ways to generate enums automatically using go:generate, e.g. https://github.com/abice/go-enum
  • Go vs Rust
    2 projects | /r/golang | 6 Mar 2023
    I wouldn't write a macro to save a couple of lines, but I would definitely use (not even write, just use) a macro for something like generating enum [de]serialization for both JSON and BSON in one line. Go, even with generics, still has no way of abstracting extremely common patterns like enums without separate generator tools. Clearly someone thought the macro was useful here, but without a macro they had no choice but to write a separate tool.
  • Enums?
    1 project | /r/golang | 8 Feb 2023
    Ive found enums in Go are a pain point, especially across an organization because there are many valid ways to implement it. It's also fairly verbose to implement. The way Ive solved for it is code generation. This is a pretty good library that my team uses in production https://github.com/abice/go-enum
  • Why no enums?
    2 projects | /r/golang | 10 Nov 2022
    I've worked in a few different languages and Go doesn't seem all that unique in the way that it doesn't provide an ENUM primitive. However, I looked around a bit and found go-enum which seems pretty neat. Also, I have no problem writing a custom string or int/iota type. In some cases you want to be able to serialize/deserialize with them -- and in others you don't need that.
  • Does Go not have enums in the sense that I can use them as a type?
    4 projects | /r/golang | 12 Oct 2022
    Along that same line you can take it a step further and generate the iota block too with this tool https://github.com/abice/go-enum
  • How to do Enums in Go
    2 projects | /r/golang | 8 May 2021
    Looks like this does what you want: https://github.com/abice/go-enum
  • A note from our sponsor - InfluxDB
    www.influxdata.com | 9 Jul 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 →

Stats

Basic go-enum repo stats
8
840
3.0
17 days ago

abice/go-enum is an open source project licensed under MIT License which is an OSI approved license.

The primary programming language of go-enum is Go.


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?