Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
Gin
Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Starting off, is there any reason you're calling out to the CLI, instead of just using a Postgres driver like pgx? Shelling out to the command line should always be a last resort where possible as a software engineer.
They're supported, but as you said, you have to map them yourself. There's a nifty library that does this for you if you want to save some time.
This is one of those rare times that almost everyone will universally recommend Cobra to handle CLI utilities. It solves a lot of your pain.
https://github.com/avelino/awesome-go is always a good place to start.
Use a library for HTTP serving, such as Gin, Chi, or Echo. I personally use Chi, as it's just the right level of abstraction for how I like to work. Despite what others say here, don't try to re-implement everything in a modern serving library using the standard library.
Use a library for HTTP serving, such as Gin, Chi, or Echo. I personally use Chi, as it's just the right level of abstraction for how I like to work. Despite what others say here, don't try to re-implement everything in a modern serving library using the standard library.
Use a library for HTTP serving, such as Gin, Chi, or Echo. I personally use Chi, as it's just the right level of abstraction for how I like to work. Despite what others say here, don't try to re-implement everything in a modern serving library using the standard library.
Use Viper for config file or environmental variable configuration -- it's going to save you a whole lot of time.
This one is highly specialized, but I'm a huge fan of Suture for managing long lived goroutines.
I'm also a fan of Conc for managing various different concurrency patterns -- don't create manual worker pools for locally distributed tasks if you can use Conc, etc.