<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Go标准库 on Tony Bai</title><link>https://tonybai.com/tags/go%E6%A0%87%E5%87%86%E5%BA%93/</link><description>Recent content in Go标准库 on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Fri, 29 May 2026 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/go%E6%A0%87%E5%87%86%E5%BA%93/index.xml" rel="self" type="application/rss+xml"/><item><title>无痛消灭技术债：Google I/O 2026 开启 Go 自动重构时代</title><link>https://tonybai.com/2026/05/29/google-io-2026-automated-go-refactoring-eliminating-technical-debt/</link><pubDate>Fri, 29 May 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/05/29/google-io-2026-automated-go-refactoring-eliminating-technical-debt/</guid><description>本文永久链接 – https://tonybai.com/2026/05/29/google-io-2026-automated-go-refactoring-eliminating-technical-debt 大家好，我是Tony Bai。 在软件开发的世界里，一直存在着一个令人绝望的“二选一”魔咒。 你要么选择 Python 或 JavaScript：它们写起来如丝般顺滑，能让你在周五下午迅...</description></item><item><title>告别 google/uuid：Go 标准库拟新增 crypto/uuid 深度解析</title><link>https://tonybai.com/2026/03/01/goodbye-google-uuid-go-standard-library-crypto-uuid/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/03/01/goodbye-google-uuid-go-standard-library-crypto-uuid/</guid><description>本文永久链接 – https://tonybai.com/2026/03/01/goodbye-google-uuid-go-standard-library-crypto-uuid 大家好，我是Tony Bai。 在 Go 的世界里，有几个第三方库的地位几乎等同于标准库，github.com/google/uuid 绝对是其中之一。无论是微服务架构、数据库主键，还是分布式追踪，UUID 的身影无...</description></item><item><title>告别 Flaky Tests：Go 官方拟引入 testing/nettest，重塑内存网络测试标准</title><link>https://tonybai.com/2026/02/10/goodbye-flaky-tests-go-testing-nettest-proposal/</link><pubDate>Tue, 10 Feb 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/02/10/goodbye-flaky-tests-go-testing-nettest-proposal/</guid><description>本文永久链接 – https://tonybai.com/2026/02/10/goodbye-flaky-tests-go-testing-nettest-proposal 大家好，我是Tony Bai。 在 Go 语言的测试哲学中，我们一直追求快速、稳定和可重复。然而，一旦测试涉及到 net 包——无论是 HTTP 服务、RPC 框架还是自定义协议——这种追求往往就会撞上现实的墙壁。 我们通常...</description></item><item><title>再见，丑陋的 container/heap！Go 泛型堆 heap/v2 提案解析</title><link>https://tonybai.com/2026/02/04/goodbye-container-heap-go-generic-heap-heap-v2-proposal/</link><pubDate>Wed, 04 Feb 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/02/04/goodbye-container-heap-go-generic-heap-heap-v2-proposal/</guid><description>本文永久链接 – https://tonybai.com/2026/02/04/goodbye-container-heap-go-generic-heap-heap-v2-proposal 大家好，我是Tony Bai。 每一个写过 Go 的开发者，大概都经历过被 container/heap 支配的恐惧。 你需要定义一个切片类型，实现那个包含 5 个方法的 heap.Interface，在 P...</description></item><item><title>Go 标准库竟然也用 vendor？std 和 cmd 模块是如何管理外部依赖的</title><link>https://tonybai.com/2026/01/28/go-standard-library-vendor-std-cmd-dependency-management/</link><pubDate>Wed, 28 Jan 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/01/28/go-standard-library-vendor-std-cmd-dependency-management/</guid><description>本文永久链接 – https://tonybai.com/2026/01/28/go-standard-library-vendor-std-cmd-dependency-management 大家好，我是Tony Bai。 我们都知道，Go 推荐使用 Go Modules 来管理依赖。但在 Go 源码树的最深处，隐藏着一个鲜为人知的秘密：**Go 标准库 (std) 和工具链 (cmd) 竟然依...</description></item><item><title>Go 标准库提供一个“Must” 函数？社区关于“断言式初始化”的思考</title><link>https://tonybai.com/2025/10/07/proposal-must-do/</link><pubDate>Tue, 07 Oct 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/10/07/proposal-must-do/</guid><description>本文永久链接 – https://tonybai.com/2025/10/07/proposal-must-do 大家好，我是Tony Bai。 if err != nil 不仅是 Go 代码中最常见的片段，更是其错误处理哲学的基石。它强制开发者在每一个可能出错的地方，都必须直面失败的可能性。然而，当一个错误在理论上可能发生，但在实践中（尤其是在处理静态、已知的常量时）又“不可能”发生时，这种严谨...</description></item><item><title>Go unique包：突破字符串局限的通用值Interning技术实现</title><link>https://tonybai.com/2024/09/18/understand-go-unique-package-by-example/</link><pubDate>Wed, 18 Sep 2024 00:00:00 +0800</pubDate><guid>https://tonybai.com/2024/09/18/understand-go-unique-package-by-example/</guid><description>本文永久链接 – https://tonybai.com/2024/09/18/understand-go-unique-package-by-example Go的1.23版本中引入了一个新的标准库包unique，为Go开发者带来了高效的值interning能力)。这种能力不仅适用于字符串类型值，还可应用于任何可比较(comparable)类型的值。 本文将简要探讨interning技术及其在G...</description></item></channel></rss>