<?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>BoilerplateCode on Tony Bai</title><link>https://tonybai.com/tags/boilerplatecode/</link><description>Recent content in BoilerplateCode on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Fri, 05 Jun 2026 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/boilerplatecode/index.xml" rel="self" type="application/rss+xml"/><item><title>别把 Go 写成 Java：毁掉项目从过度架构开始</title><link>https://tonybai.com/2026/06/05/stop-writing-go-like-java-avoid-over-architecting/</link><pubDate>Fri, 05 Jun 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/06/05/stop-writing-go-like-java-avoid-over-architecting/</guid><description>本文永久链接 – https://tonybai.com/2026/06/05/stop-writing-go-like-java-avoid-over-architecting 大家好，我是Tony Bai。 前不久，Go 语言社区 Reddit (r/golang) 上爆发了两场激烈的争论。 这两个帖子的主题直击了无数 Go 开发者的灵魂深处： 1. 我们该如何构建一个大型的 Go 模块化单体...</description></item><item><title>再见样板代码！Go 官方新提案：函数一键转接口</title><link>https://tonybai.com/2026/06/02/no-more-boilerplate-go-proposal-function-to-interface-conversion/</link><pubDate>Tue, 02 Jun 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/06/02/no-more-boilerplate-go-proposal-function-to-interface-conversion/</guid><description>本文永久链接 – https://tonybai.com/2026/06/02/no-more-boilerplate-go-proposal-function-to-interface-conversion 大家好，我是Tony Bai。 在 Go 语言日常开发中，有一个设计几乎人人写过，但写多了又让人觉得极其繁琐、甚至有些“脱裤子放屁”的样板代码。 假设你需要一个只读数据的 io.Reader...</description></item><item><title>别再像 2015 年那样写 Go 了：Modern Go 终极进化指南</title><link>https://tonybai.com/2026/03/02/modern-go-evolution-guide-1-0-to-1-26/</link><pubDate>Mon, 02 Mar 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/03/02/modern-go-evolution-guide-1-0-to-1-26/</guid><description>本文永久链接 – https://tonybai.com/2026/03/02/modern-go-evolution-guide-1-0-to-1-26 大家好，我是Tony Bai。 Go 语言在业界最著名的标签之一就是“向后兼容承诺（Go 1 Compatibility Promise）”。一份 10 年前写下的 Go 1.4 代码，在今天的 Go 1.26编译器下依然能完美编译并运行。 但...</description></item><item><title>当“安全性”遭遇“交付速度”：2026 年，我为什么告别了 Rust</title><link>https://tonybai.com/2026/02/21/safety-vs-delivery-speed-why-farewell-rust-in-2026/</link><pubDate>Sat, 21 Feb 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/02/21/safety-vs-delivery-speed-why-farewell-rust-in-2026/</guid><description>本文永久链接 – https://tonybai.com/2026/02/21/safety-vs-delivery-speed-why-farewell-rust-in-2026 大家好，我是Tony Bai。 在软件工程的铁三角中，Rust 占据了“安全性”与“性能”的绝对高地。凭借借用检查器（Borrow Checker）和极其严格的类型系统，它向开发者承诺了一个没有内存错误、没有空指针崩溃...</description></item><item><title>数据打脸刻板印象：Go 的“样板代码”竟然和 Rust 一样多？</title><link>https://tonybai.com/2026/02/08/go-boilerplate-code-vs-rust-data-refutes-stereotypes/</link><pubDate>Sun, 08 Feb 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/02/08/go-boilerplate-code-vs-rust-data-refutes-stereotypes/</guid><description>本文永久链接 – https://tonybai.com/2026/02/08/go-boilerplate-code-vs-rust-data-refutes-stereotypes 大家好，我是Tony Bai。 在编程语言的鄙视链中，Go 语言常常因为其“繁琐”而饱受诟病。 “if err != nil 写断手”、“缺乏语法糖”、“到处都是重复的样板代码”…… 这些似乎已经成为了 Go 的标...</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>“为什么很多工程师还在无视 AI 编程？”—— 这里的答案，或许决定了你三年后的身价</title><link>https://tonybai.com/2025/12/29/why-many-software-engineers-still-ignore-ai-programming/</link><pubDate>Mon, 29 Dec 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/12/29/why-many-software-engineers-still-ignore-ai-programming/</guid><description>本文永久链接 – https://tonybai.com/2025/12/29/why-many-software-engineers-still-ignore-ai-programming 大家好，我是Tony Bai。 &amp;gt; “我注意到一件让我非常惊讶的事：似乎大多数软件工程师并没有充分利用（甚至根本不用）像 Claude Code、Cursor 或 GitHub Copilot 这样的 AI ...</description></item><item><title>Bash 虽好，但我选 Go：如何用 10 倍代码换来 100 倍的维护性？</title><link>https://tonybai.com/2025/12/24/bash-vs-go-10x-code-100x-maintainability/</link><pubDate>Wed, 24 Dec 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/12/24/bash-vs-go-10x-code-100x-maintainability/</guid><description>本文永久链接 – https://tonybai.com/2025/12/24/bash-vs-go-10x-code-100x-maintainability 大家好，我是Tony Bai。 &amp;gt; “Bash 是一种很棒的胶水语言，但 Go 是更好的胶水。” 在日常开发中，我们经常会写一些 Bash 脚本来处理本地环境配置、启动 Docker 容器、同步密钥等琐碎任务。起初，它们只是几行简单的命令...</description></item></channel></rss>