enumer icon indicating copy to clipboard operation
enumer copied to clipboard

A Go tool to auto generate methods for your enums

Results 36 enumer issues
Sort by recently updated
recently updated
newest added

`-trimprefix` accepts a [comma-separated list](https://github.com/dmarkham/enumer/blob/870b5b97632ec91dec3e31973c7b549215dc7063/stringer.go#L435) of prefixes, but the README/help doesn't mention this.

The readme does a good job of explaining the use of enumer, comprehensive enough that you might not need more, but the actual use of the package is sort of...

enhancement

[kr/pretty](https://pkg.go.dev/github.com/kr/pretty) wants a type to implement [fmt.GoStringer](https://pkg.go.dev/fmt#GoStringer), so I had to wrap enumer's String, e.g. ```go func (x MyType) GoString() string { return x.String() } ``` It'd be nice if...

This is one of my two solutions to fix #40. Add a `-casesensitive` flag, which disables all generation of lower-cased values. - This required more code changes up front, and...

This is one of my two solutions to fix #40. Split `_typeNameToValueMap` into `_typeNameToValueMap` and `_typeLowerNameToValueMap`. - `_typeNameToValueMap` is checked first with a fallback to the lower-cased map. This lets...

Would it make sense to add support for enum aliases ? Example: ```go type MyType int const ( A MyType = iota B ) const ( AlsoA = A BInSpanish...