Monday Nugget


Inspiring Mondays, Empowering Weeks!
  • Golang Nugget - September 2, 2024

    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]
  • Golang Nugget - August 26, 2024

    Welcome to this week’s edition of Golang Nugget, your go-to source for the latest in the Go programming world!

    This week, we dive into the exciting release of Go 1.23, which brings new features like iterator functions for “for-range” loops and preview support for generic type aliases. We also explore the enhancements in Go’s standard library and tool improvements, including Go telemetry and new command conveniences.

    Understanding channels is crucial for effective concurrency in Go. We break down three ways to think about channels, highlighting their role in Go’s concurrency model and how they interact with other primitives.

    Performance is key, and we look at how sentinel errors and errors.Is() can slow down your code. Learn about more efficient error handling strategies to keep your Go applications running smoothly.

    The introduction of range over function types in Go 1.23 simplifies iterating over custom containers, making it easier to write generic functions. We also touch on the improvements in secure randomness with Go 1.22, enhancing security by default.

    Lastly, we explore writing generic collection types in Go, sharing insights and tips for implementing sortable sets using generics.

    Stay tuned for more insights and updates in the world of Go!

    [Read More]