tech
Study Go‘s Concurrency Bugs In The Real-World
I read a paper about real-world go concurrency error bugs, and here’s a transcript of what I read as a start to learning about go concurrency programming.
tech
I read a paper about real-world go concurrency error bugs, and here’s a transcript of what I read as a start to learning about go concurrency programming.
tech
In 2023, there have been some changes to Go’s concurrency library, and this article provides an overview of these changes. Minor details such as typos and documentation changes will not be covered.
tech
How a Single Proposal with 900+ Comments is Quietly Reshaping Go's Syntax It started in August 2017. A developer opened issue #21498 on the Go repository with a modest title: "proposal: spec: short function literals." Nobody could have predicted that eight years later, the discussion would
blog
深入 Go 最常用包的 5 年重写之旅:API 完美主义、内存回退,以及向后兼容的沉重代价。
tech
Go Officials Revisit Error Handling — Why the New Syntax Is Still Stuck Recently, the official Go blog published a post titled On | No syntactic support for error handling. Contrary to the community’s anticipation for a breakthrough in syntax, the article took a step back—revisiting Go’s long and
tech
This article explores best practices for developing Go applications in Kubernetes, focusing on the different stages of a Pod’s lifecycle and the role of Kubernetes termination signals. Properly managing these phases ensures smooth application shutdowns, preventing data loss or disruptions to user experience. By mastering lifecycle management, teams can
tech
Discover how CloudWeGo's goref tool revolutionizes memory leak detection in Go, overcoming pprof limitations. Learn about its deep heap analysis capabilities, GC marking process, and DWARF type scanning for effective memory management. This article is essential for Go developers seeking to optimize…
tech
Go1.24引入了mutex自旋优化,提升性能最高可达70%。通过增加spinning状态,减少了锁竞争时的CPU资源浪费,优化了多线程环境下的性能表现。基准测试显示,在高竞争场景下,mutex的性能显著提升,平均性能提升约29%。该特性默认开启,用户可通过GOEXPERIMENT控制,期待在未来的版本中进一步优化。
tech
This article delves into the go:fix tool, its principles, applications, and usage examples for automated code migration.
tech
随着项目规模的扩大,Go语言的go:fix工具为代码迁移提供了自动化解决方案。通过简单的注释指令,开发者可以轻松替换弃用的函数和常量,提升开发效率,降低错误风险。本文深入探讨了go:fix的背景、机制及其优势与挑战,适合希望优化代码维护的开发者。
tech
Go 1.24 brings significant updates to its toolchain, streamlining dependency management, accelerating workflows, and catching bugs earlier. While language features often steal the spotlight, improvements to Go’s tools can dramatically impact developer productivity. Let’s break down two major areas: go tool and vet, with practical examples to
tech
Go 1.24 引入了许多工具方面的重要更新,这些更新让开发者在管理依赖、调试问题以及编写更高质量代码时变得更加高效。尽管人们通常会将注意力集中在标准库或语言特性上的变化,但 Go 工具生态系统的改进同样值得关注。在本文中,我们将重点探讨两个关键领域的改进:go tool和vet工具,并通过实际示例展示这些更新如何优化你的工作流程。 Go 命令的增强功能 在 Go 1.24 中,go 命令进行了多项改进,使得依赖管理和工具执行更加高效且易于使用。其中最显著的变化之一是 go.mod 文件中新增了 tool 指令,允许你直接跟踪可执行工具依赖,而无需依赖诸如空导入等不直观的解决方案。 使用 Tool 指令跟踪可执行工具依赖 我们在项目中大量使用mockery[1](一个流行的 Mock 代码生成器),使用方式是通过brew 安装或者直接下载特定版本的exe 执行文件。但是这样有个问题,如果不同开发者使用的mockery 版本不一致,会造成非预期的代码冲突。在过去,如果您想将这样的工具作为项目的一部分,