Go Patterns

I began learning Go in 2019, and it swiftly became my most productive and preferred backend programming language. In this article, I’ll share some common patterns I’ve observed in Go applications and explain why I favor them over other options. Errors Instead of checking for nil values or comparing empty structs, it’s preferable to return both a value and an error, then check the error. This approach is familiar to others and simplifies error handling throughout the codebase....

March 27, 2024 · 6 min · Garrett Delfosse