Welcome to this week’s edition of Golang Nugget, your go-to source for the latest insights and updates in the Go programming world!
This week, we dive into the performance showdown between gRPC+Protobuf and HTTP+JSON, revealing some surprising results that challenge common assumptions about speed and efficiency.
We also explore the intricacies of building static binaries with Go on Linux, offering practical tips to ensure your binaries are truly static, even when incorporating C code.
For those tackling complex debugging challenges, we introduce a powerful tool for hash-based bisect debugging, which simplifies pinpointing bugs in large codebases.
The new unique
package in Go 1.23 is also in the spotlight, offering a robust solution for deduplicating comparable values efficiently.
If you’re building REST APIs, our guide on using Ent and net/http
in Go will help you get started quickly and effectively.
We also cover the importance of graceful shutdowns in Go applications, especially in Kubernetes environments, to ensure data integrity and resource management.
Lastly, we discuss a clever technique for faking method calls within structs, simplifying testing without cluttering your codebase.
Enjoy the read and happy coding!
[Read More]