alvaroloes / enumer

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

Make type to string conversion case insensitive #61

Open andig opened 4 years ago

andig commented 4 years ago

https://github.com/alvaroloes/enumer/blob/master/enumer.go#L7 shows the template for to string transformation. Reading user input from config file I would like to support this in a case-insensitive way. Since my type is in camel case, there is no option of preparing this operation on the string side before conversion.