Hacker News new | ask | show | jobs
by StefanWestfal 1292 days ago
Thank you for putting your time into the project!

Besides this project I like sqlc a lot but in both scenarios I was wondering how one gets started in code generation tooling? So that I could contribute, extend or even create my own (I.e. I would like to extend sqlc for better integration with FastAPI).

1 comments

Thanks! I think the best place for code generation in Go would be: 1) Go templating: https://pkg.go.dev/text/template 2) Go reflection: https://go.dev/blog/laws-of-reflection (there are many articles and documentation on this).

Then I would try to do something small to experience both libraries hands-on as otherwise it's hard to get the hang of it. Once you did a small project I would go and try to contribute a small fix/feat to sqlc to understand sqlc code structure and from there potentially a bigger feature/extension for sqlc.