4 ms·
I worked on a side project to try and generate mapping code with Go (like mapstruct) but abandoned it: https://github.com/liampulles/juryrig https://github.com/
by liampulles 3y ago
I worked on a side project to try and generate mapping code with Go (like mapstruct) but abandoned it: https://github.com/liampulles/juryrig https://github.com/liampulles/juryrig
I do wish there was a nice library to aid in parsing Go, there may be one I'm not aware of - I used the standard AST library but it is very verbose. Actually generating the code is very easy and go format helps a lot.
Custom kubernetes operators in Go use code generation via comments extensively, perhaps worth looking at.