Closed THE108 closed 7 years ago
Hey @THE108. Thank you very much!
Not only for the funcionality, but for including tests and all the other "little touches" (like the .gitignore and corrections in the Readme)
I'll merge this (I will just fix some typos in the new text added to the Readme 😉 )
Happy coding!
Stringer tool uses the same name for enum value string representation (usually CamelCase in Go).
Sometimes you need to use some other string representation format then CamelCase (i.e. in JSON).
To transform enum value string representation from CamelCase to snake_case or kebab-case
transform
flag could be used.For example, for
enumer -type=MyType -json -transform=snake
command the next string representation will be generated: