Goenums: Type Safe Enum Generator for Go
a year ago
- #enum
- #code-generation
- #Go
- Goenums generates type-safe enum implementations from simple constant declarations in Go.
- Features include string conversion, validation, JSON handling, database integration, and more.
- Supports custom fields, case-insensitive parsing, and exhaustive handling of enum values.
- Seamless integration with Go's tooling, including go:generate directives.
- Outputs modern Go 1.21+ iterator support with legacy fallback options.
- Example usage includes defining enums with custom fields and parsing from various sources.