Closed Maxence1 closed 3 years ago
Interesting I never thought about this. I feel like it should return the in the error message what ever you pass in. I'll poke around this and see if I can not come up with a patch!
@Maxence1 do you have a change to have a look at this to see if it meets your needs?
All merged in and should be working as you expected now!
Hi team,
I was trying to do some unhappy path test case using
//go:generate enumer -type=BusinessType -json -transform upper
And when I test a "does not belong to BusinessType values" case: I entered ABC, and expect to get "ABC does not belong to BusinessType values", but what I get is "abc does not belong to BusinessType values"
I think it's because the generated function BusinessTypeString transformed it into lower case, it's not impacting the code logic, but my test case becomes a little weird:
The question is, is there any way to generate without the toLower() transform in function BusinessTypeString?
Many thanks!
Best regards,