- Tags/
golang
2023
Create Robust "Enums" in Go
While Go doesn’t have proper enums, you can create a more robust enum-like construct using interfaces and structs.
Things to Consider When Going With sqlc
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.
Partially-Implemented Interfaces in Go
When you just want to implement one or two methods … but be careful.
User or *User - Do We Need Struct Pointers Everywhere?
A bit of up-front thinking can help make our Go code cleaner and more performant.
2022
Epic Rap Battles of Programming: Java vs. Go
Two programming language giants appear on stage for a massive rap battle. Who will win?
Consistent > Idiomatic
As a software engineer, I’ve learned that consistency in code is crucial for the long-term success of a project, even when it means deviating from idiomatic principles.
Go: Import Cycles via Third Packages Are Not Permitted
You cannot trick the Go compiler, and that is a good thing.
pq or pgx - Which Driver Should I Go With?
If you are betting on PostgreSQL, pgx is the right choice.
2021
Implementing a Generic Filter Function in Go
This article will demonstrate the implementation of a generic slice filter function using the new type parameters syntax.