<?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>构造函数 on Tony Bai</title><link>https://tonybai.com/tags/%E6%9E%84%E9%80%A0%E5%87%BD%E6%95%B0/</link><description>Recent content in 构造函数 on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Sun, 04 Jan 2026 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/%E6%9E%84%E9%80%A0%E5%87%BD%E6%95%B0/index.xml" rel="self" type="application/rss+xml"/><item><title>让编译器成为你的副驾驶：告别“防御性编程”，拥抱“类型驱动开发”</title><link>https://tonybai.com/2026/01/04/stop-lying-to-the-compiler/</link><pubDate>Sun, 04 Jan 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/01/04/stop-lying-to-the-compiler/</guid><description>本文永久链接 – https://tonybai.com/2026/01/04/stop-lying-to-the-compiler 大家好，我是Tony Bai。 “半夜被值班的运维同事叫醒，发现生产环境崩了，原因是一个深藏在业务逻辑里的 nil 指针异常。” 这个场景，对于每个后端开发者来说都是挥之不去的噩梦。事后复盘时，我们往往会懊恼：“为什么这里没加 if != nil 判断？”然后，我们...</description></item><item><title>超越零值：Go 语言“构造模式”深度指南</title><link>https://tonybai.com/2025/09/12/go-constructor-pattern-guide/</link><pubDate>Fri, 12 Sep 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/09/12/go-constructor-pattern-guide/</guid><description>本文永久链接 – https://tonybai.com/2025/09/12/go-constructor-pattern-guide 大家好，我是Tony Bai。 Go 语言的设计哲学崇尚简约与直白(straightforward)。其中，结构体字面量 (Struct Literal) 的存在，让我们可以用极其简单的方式创建数据结构。然而，在构建大型、复杂的系统时，这种简单性也可能成为一把双...</description></item><item><title>Go导出标识符：那些鲜为人知的细节</title><link>https://tonybai.com/2025/01/23/the-hidden-details-of-go-exported-identifiers/</link><pubDate>Thu, 23 Jan 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/01/23/the-hidden-details-of-go-exported-identifiers/</guid><description>本文永久链接 – https://tonybai.com/2025/01/23/the-hidden-details-of-go-exported-identifiers 前不久，在“Go+用户组”微信群里看到有开发者向七牛云老板许式伟反馈七牛云Go SDK中的某些类型没有导出，导致外部包无法使用的问题(如下图)： 七牛开发人员迅速对该问题做出了“更正”，将问题反馈中涉及的类型saveasArgs...</description></item><item><title>写出Go标准库级别文档注释的十个细节</title><link>https://tonybai.com/2024/10/27/ten-details-when-using-documentation-comments/</link><pubDate>Sun, 27 Oct 2024 00:00:00 +0800</pubDate><guid>https://tonybai.com/2024/10/27/ten-details-when-using-documentation-comments/</guid><description>写出Go标准库级别文档注释的十个细节 | Tony Bai =============== Tony Bai一个程序员的心路历程 * Google Go语言编码风格规范 * Google Go语言编码风格规范：指南篇 * Google Go语言编码风格规范：决定篇 * Google Go语言编码风格规范：最佳实践篇 * Go语言第一课FAQ * 关于我 * 文章列表 写出Go标准库级别文档注释的十...</description></item></channel></rss>