A simple pattern that will help you reduce error handling, while keeping your Go code simple and idiomatic.
My struggle to choose the right type semantic and keep code consistent at the same time.
It’s not the performance, and neither is it the complexity.
Did Google reinvent both EJBs and Spring in Go?
Good error messages add up and tell a story
Who is going to build it?
While Go doesn’t have proper enums, you can create a more robust enum-like construct using interfaces and structs.
sqlc is a fantastic time and boilerplate saver, but is not a one-size-fits-all solution. Here are a few drawbacks I think people should be aware of.
When you just want to implement one or two methods … but be careful.
A bit of up-front thinking can help make our Go code cleaner and more performant.
Explicit > Implicit
Will it, really?
Idiomatic is what works for you and your team at the end of the day
You cannot trick the Go compiler, and that is a good thing.
If you are betting on PostgreSQL, pgx is the right choice.