When writing a Go application that handles data in a database (in this post, I will focus on relational databases), we have a few options:
write SQL queries using some lib that implements the stdlib interfaces use some lib that facilitates SQL generation, like Squirrel although not as widespread as in other languages, we can use some ORMs, like the ones listed here use a tool to generate code from SQL queries I will present in this post a project that fits in the last category: sqlc.