Recover panics in all Goroutines you start
https://dev.ribic.ba/recover-panics-goroutines
I recently joined a project where the codebase was written in Go. While the codebase had numerous issues, one stood out: the server restarted unexpectedly and frequently. After examining the server logs, I discovered the culprit—panic-induced crashes in Goroutines. The underlying issue was that the codebase didn’t handle panic recovery in all the Goroutines it started.
https://dev.ribic.ba/recover-panics-goroutines
zog
https://github.com/Oudwins/zog
Zog is a schema builder for runtime value parsing and validation. Define a schema, transform a value to match, assert the shape of an existing value, or both. Zog schemas are extremely expressive and allow modeling complex, interdependent validations, or value transformations.
https://github.com/Oudwins/zog
genqlient
https://github.com/Khan/genqlient
genqlient is a Go library to easily generate type-safe code to query a GraphQL API. It takes advantage of the fact that both GraphQL and Go are typed languages to ensure at compile-time that your code is making a valid GraphQL query and using the result correctly, all with a minimum of boilerplate.
https://github.com/Khan/genqlient
peerdb
https://github.com/PeerDB-io/peerdb
Fast, Simple and a cost effective tool to replicate data from Postgres to Data Warehouses, Queues and Storage
https://github.com/PeerDB-io/peerdb
Faster Go maps with Swiss Tables
https://go.dev/blog/swisstable
Swiss Tables are a form of open-addressed hash table, so let’s do a quick overview of how a basic open-addressed hash table works.
https://go.dev/blog/swisstable
The cost of Go’s panic and recover
https://jub0bs.com/posts/2025-02-28-cost-of-panic-recover
TL;DR
- Some of the wisdom contained in Josh Bloch’s Effective Java book is relevant to Go.
- panic and recover are best reserved for exceptional circumstances.
- Reliance on panic and recover can noticeably slow down execution, incurs heap allocations, and precludes inlining.
- Internal handling of failure cases via panic and recover is tolerable and sometimes beneficial.
https://jub0bs.com/posts/2025-02-28-cost-of-panic-recover
How to manage tool dependencies in Go 1.24+
https://www.alexedwards.net/blog/how-to-manage-tool-dependencies-in-go-1.24-plus
https://www.alexedwards.net/blog/how-to-manage-tool-dependencies-in-go-1.24-plus
Scaling gRPC With Kubernetes (Using Go)
https://nyadgar.com/posts/scaling-grpc-with-kubernetes-using-go
https://nyadgar.com/posts/scaling-grpc-with-kubernetes-using-go
Building RAG systems in Go with Ent, Atlas, and pgvector
https://entgo.io/blog/2025/02/12/rag-with-ent-atlas-pgvector
https://entgo.io/blog/2025/02/12/rag-with-ent-atlas-pgvector
Tips to debug hanging Go programs
https://michael.stapelberg.ch/posts/2025-02-27-debug-hanging-go-programs
I was helping someone get my gokrazy/rsync implementation set up to synchronize RPKI data (used for securing BGP routing infrastructure), when we discovered that with the right invocation, my rsync receiver would just hang indefinitely.
This was a quick problem to solve, but in the process, I realized that I should probably write down a few Go debugging tips I have come to appreciate over the years!
https://michael.stapelberg.ch/posts/2025-02-27-debug-hanging-go-programs
Nil channels in Go
https://vishnubharathi.codes/blog/nil-channels-in-go
A friend from work messaged me today that they had a hard time because they had used var c chan int instead of c := make(chan int) in their Go code.
I responded by saying that I usually have one rule of thumb i.e. to always use of make() whenever I need a channel or map. That way I can be very sure that I can use those immediately.
They added that the surprising thing was it didn’t panic the program rather they ended up with an infinite loop that ran silently. I got more intrigued about the situation. So many questions started popping up in my mind. Why was I not able to catch it in the code review? Why was there no linter rule that could catch this? What is the point of having a nil channel in Go if I am brainwashing myself to always use make()?
I went on to get some answers and here they are!
https://vishnubharathi.codes/blog/nil-channels-in-go
gore
https://github.com/x-motemen/gore
Yet another Go REPL that works nicely. Featured with line editing, code completion, and more.
https://github.com/x-motemen/gore
wait4x
https://github.com/atkrad/wait4x
Wait4X is a powerful, zero-dependency tool that waits for services to be ready before continuing.
https://github.com/atkrad/wait4x
From unique to cleanups and weak: new low-level tools for efficiency
https://go.dev/blog/cleanups-and-weak
TLDR:
Go 1.24 introduces two advanced memory management features: runtime.AddCleanup and the weak package.
runtime.AddCleanup: This function registers a cleanup function to execute when an object becomes unreachable, offering a more flexible and efficient alternative to traditional finalizers.
weak Package: This package provides weak pointers, which reference objects without preventing their garbage collection. This is particularly useful for implementing memory-efficient structures like caches or canonicalization maps.
These features enable developers to create more efficient and robust Go applications, especially in scenarios requiring precise control over resource management and memory usage.
https://go.dev/blog/cleanups-and-weak
Different ways of working with SQL Databases in Go
https://packagemain.tech/p/different-ways-of-working-with-sql
In this article, we'll explore and compare most popularly used Go packages with hands-on examples, pros and cons. We will also briefly touch on the topic of database migrations and how to manage them in Go. You'll get the most out of this article if you already have some experience with Go, SQL and relational databases (doesn't matter which one).
https://packagemain.tech/p/different-ways-of-working-with-sql
search
https://github.com/kelindar/search
This library was created to provide an easy and efficient solution for embedding and vector search, making it perfect for small to medium-scale projects that still need some serious semantic power. It’s built around a simple idea: if your dataset is small enough, you can achieve accurate results with brute-force techniques, and with some smart optimizations like SIMD, you can keep things fast and lean.
https://github.com/kelindar/search