GoLang

  • GoLang Nugget - September 16, 2024

    Welcome to this week’s edition of GoLang Nugget, your go-to source for all things Go!

    In this issue, we dive into the world of Go binaries, exploring the differences between static and dynamic linking. Discover how to make your Go programs more portable and secure by choosing the right linking method.

    Next, we venture into the browser with Go and WebAssembly. Learn how to run Go code in the browser, manipulate the DOM, and keep your UI responsive using Web Workers. Plus, find out how TinyGo can help you create smaller, faster-loading WASM binaries.

    Finally, we explore building LLM-powered applications in Go. Uncover how Go’s strengths in concurrency and performance make it ideal for creating scalable applications that leverage large language models. From setting up a RAG server to using frameworks like LangChainGo, we’ve got you covered.

    Stay tuned for more insights and tips to enhance your Go programming journey!

    [Read More]
  • GoLang Nugget - September 9, 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 new telemetry features introduced in Go 1.23. Telemetry helps improve the Go toolchain by collecting data to fix bugs and make informed decisions. Learn how to enable or disable telemetry and discover its role in enhancing Go’s growth.

    Next, we explore how to read Google Sheets using Go. This guide walks you through setting up a service account and using OAuth 2.0 for authentication, making it easy to access and process data from Google Sheets in your Go applications.

    Lastly, we discuss the use of Database Proxies. These proxies act as a middle layer between applications and databases, simplifying complex systems and enhancing security. Check out a simple Go example that demonstrates how to create a proxy to manage SQL queries effectively.

    Stay tuned for more insights and happy coding!

    [Read More]
  • 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]