Open martinlindhe opened 8 years ago
Do you have a preference/strong inclination to use golang to generate these files? If not, I'd be happy to send you a PR for using ruby/erb to generate the go code.
I do feel the solution should be written in golang too, as this is a go lib. Any particular reason for wanting to use another language?
I just find it easier to write template-style programs in ruby, especially since interpolation is easier and map/each blocks are more compact, but that could just be because I haven't tried using go to generate a go program yet. I'll check back when I'm more comfortable writing go template programs and if this still needs work, I can try to put something together.
It would make sense to generate this code from some tables.
See https://blog.golang.org/generate