alvaroloes / enumer

A Go tool to auto generate methods for your enums
Other
478 stars 111 forks source link

Add support for several new transformation options. #41

Closed josephtfrank closed 5 years ago

josephtfrank commented 5 years ago

This change adds support for additional transformations of the name. The new values are lower, upper, json, kebabu, and snakeu.

Options have been added to handle more permissive translation from a string to a value. The -ignorecase option ignores case when comparing the input string to the enum name. The -numeric option allows translation of numbers in input strings in addition to the enum names.

Finally, an option has been added to specify a zero value enum which is represented by an empty string. The empty string is used when generating

alvaroloes commented 5 years ago

Closing this as it seems a duplicate of https://github.com/alvaroloes/enumer/pull/31 Please reopen if it is not the case