dmarkham / enumer

A Go tool to auto generate methods for your enums
Other
410 stars 66 forks source link

feature request: integration with validator/gin bindings #49

Closed mikwys closed 9 months ago

mikwys commented 3 years ago

Firstly, I'd like to thank you for great work, I found enumer really helpful!

I am not sure about proper solution, however I think that may be doable by another flag/parameter.

In perfect scenario it would either implement validator interface, or return validator.ValidationErrors. If not, maybe there is possibility to generate helper validator functions to bind for API models.

dmarkham commented 9 months ago

I do not really want to bring in any external libraries, or external types, people rely on this library to not introduce new things into their code base. We currently pull in 4 libraries and 3 of them are from golang.org, I would like to remove them all if I could.