R_REDDYX.XYZ
AIGo★ 525⑂ 77 forks

dmarkham/enumer

AUTO ENUM GENERATION IN GO

enumer is a Go utility that automatically generates common methods for your enum types: String(), MarshalJSON, UnmarshalJSON and parsing from a string. Just add the comment //go:generate enumer -type=MyEnum and get ready‑to‑use code without boilerplate.

// KEY FEATURES

  • Generates the String() method for convenient string representation of enum values.
  • Creates MarshalJSON and UnmarshalJSON for correct JSON serialization and deserialization.
  • Implements a Parse function that converts arbitrary strings to enum values with validation.
  • Supports custom tags and options via the //go:generate comment, without modifying source code.
#code-generation#codegeneration#codegenerator#enum#enums#generator#golang
Open on GitHub →

New repositories every 30 minutes

REDDYX AI scans GitHub 24/7 and ships the best AI/ML/Web3 projects to Telegram.

Join on Telegram
← Full catalog·Full index

// SIMILAR REPOSITORIES

PROMETHEUS MCP SERVER FOR AI★ 525CLAUDEXOR - Local AI Controller★ 525TERMISH: AI TERMINAL FOR MOBILE★ 525🤖 WANMAN★ 524Lyrie.ai — Autonomous AI Cybersecurity Agent★ 524OPENPAPER: Your Smart Researcher★ 524

← FULL CATALOG

dmarkham/enumer — Auto Enum Generation IN GO | REDDYX AI