Registry / utility / alvaroloes-enumer

alvaroloes-enumer

JSON →
library1.1.2gogounverified

Enumer is a tool to generate Go code that adds useful methods to Go enums (constants with a specific type).

go get github.com/alvaroloes/enumer
INSTALL
IMPORT
SIG · ALVAROLOES-ENUMER
A
alvaroloes-enumer
utilitygov1.1.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

enumer
github.com/alvaroloes/enumer

Generates enum methods for a type

//go:generate enumer -type=Color -json -text package main type Color int const ( Red Color = iota Green Blue ) func main() { // After running go generate, Color has String(), MarshalJSON(), etc. c := Red println(c.String()) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.1.2latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
26 hits · last 30 days
node
24
Meta
1
OpenAI (training)
1
Resources
alvaroloes-enumer — go get alvaroloes-enumer · libregistry