Golang notes – Telegram
This blogpost shares a personal journey of learning to write reliable Go code, transitioning from anxiety-filled nights to confident deployments. The author highlights key strategies for building trustworthy code, including robust error handling, comprehensive testing of failure modes, graceful degradation, and built-in monitoring. By adopting these practices, developers can ensure their code is not just functional but also resilient and maintainable, allowing them to commit with confidence and enjoy a worry-free weekend.

https://dev.to/trungdlp/go-code-you-can-trust-sleep-well-after-you-commit-440n
👍1
This blogpost delves into the world of custom marshaling in Go, focusing on how to handle flexible data types that can be either strings or arrays of strings. It demonstrates how to implement yaml.Unmarshaler and yaml.Marshaler interfaces to seamlessly parse and generate YAML data that can represent both single values and lists. The post also extends this approach to JSON, showing how similar techniques can be applied to handle JSON data with the same flexibility.

https://carlosbecker.com/posts/go-custom-marshaling/
This article delves into the strategic decision to migrate TypeScript's compiler from JavaScript to Go, driven by performance and scalability needs. The choice of Go over Rust and C# was influenced by its native code optimization capabilities, automatic garbage collection, and ease of transition from JavaScript. The migration aims to achieve a 10-fold performance improvement, leveraging Go's concurrency features and efficient data structure handling. Despite challenges like maintaining compatibility and redesigning APIs, the project promises significant benefits for the TypeScript ecosystem.

https://dev.to/leapcell/typenoscript-to-go-the-real-reasons-behind-the-10x-typenoscript-416
👍1
This article discusses the introduction of the os.Root API in Go 1.24, designed to prevent path traversal vulnerabilities. Path traversal occurs when an attacker tricks a program into accessing unintended files by manipulating relative paths or symlinks. The os.Root API provides a safe way to operate on files within a specified directory, disallowing operations that escape the root directory. It offers methods for creating, opening, and managing files securely, making it ideal for applications handling untrusted filenames, such as archive extractors.

https://go.dev/blog/osroot
This article provides 11 practical tips for structuring Go projects effectively. It emphasizes that there is no one-size-fits-all approach and encourages developers to adapt their codebase structure based on the project's specific needs. The tips range from using standard layouts as a starting point to avoiding unnecessary directories and keeping related code close together. By following these guidelines, developers can create a well-organized and maintainable codebase that supports efficient development and collaboration.

https://www.alexedwards.net/blog/11-tips-for-structuring-your-go-projects
🔥1
This article compares Go and Rust, two popular programming languages, focusing on their code writing styles, performance, and application areas. Go is praised for its simplicity, efficiency, and excellent concurrency support, making it ideal for network services and cloud computing. Rust, on the other hand, excels in memory safety and high performance, making it suitable for system programming and applications requiring strict security. The article highlights the strengths and weaknesses of each language, providing insights for developers choosing between them for specific projects.

https://dev.to/leapcell/why-is-rust-so-far-behind-go-45cd
👍2
Paul Thorpe's exploration of "cursed Go" features uncovers unconventional or surprising behaviors in the language, from oddities in type inference to unexpected quirks in the standard library. This review encourages readers to approach Go's edge cases with curiosity and a sense of humor.

https://pthorpe92.dev/cursed-go/
Go 1.24 introduces a powerful new go tool command and a tool directive in go.mod, making it easier than ever to manage project-specific tools directly within your Go codebase. In this article, Jamie Tanna shares why these changes are among the most significant improvements to the Go ecosystem in recent years.

https://www.jvt.me/posts/2025/01/27/go-tools-124/
Go 1.24 introduces a Swiss Table-based map implementation, delivering significant performance improvements to map operations in the language. This blogpost explains how the Swiss Table design-originally developed by Google-enables faster lookups, better memory usage, and improved efficiency for densely populated maps, all while maintaining full backward compatibility for Go developers.

https://www.bytesizego.com/blog/go-124-swiss-table-maps
Developing Kubernetes controllers is deceptively easy to start, but fraught with pitfalls that can lead to unreliable, unscalable, or hard-to-maintain systems. In this guide, Ahmet Alp Balkan outlines common mistakes and best practices for designing idiomatic APIs and robust controllers, drawing from real-world experience at large companies and lessons learned from the broader Kubernetes ecosystem.

https://ahmet.im/blog/controller-pitfalls/
👍2