3 ms·
I don't have a big problem using codegen to get "syntax" for enumerations. "go generate ./..." before you checkin, save yourself some typing. I have used this
by jrockway 3y ago
I don't have a big problem using codegen to get "syntax" for enumerations. "go generate ./..." before you checkin, save yourself some typing.
I have used this in the past:
https://github.com/abice/go-enum https://github.com/abice/go-enum
But mostly use protos as much as possible these days. (The enum is going to be in the API, might as well use the same object inside the app.)
- pjmlp 3y agoI left that kind of gimmicks behind me in C++ compilers for MS-DOS.