<?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>Rune on Tony Bai</title><link>https://tonybai.com/tags/rune/</link><description>Recent content in Rune on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Tue, 09 Dec 2025 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/rune/index.xml" rel="self" type="application/rss+xml"/><item><title>Go 的“最小惊讶原则”破功了吗？—— 一个vet 新提案引发的思考</title><link>https://tonybai.com/2025/12/09/vet-add-check-for-using-verb-q/</link><pubDate>Tue, 09 Dec 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/12/09/vet-add-check-for-using-verb-q/</guid><description>本文永久链接 – https://tonybai.com/2025/12/09/vet-add-check-for-using-verb-q 大家好，我是Tony Bai。 Go 语言的设计哲学，一向以“简单、明确、无魔法”著称，其目标是让代码的行为**尽可能符合开发者的直觉**，即遵循所谓的**“最小惊讶原则” (Principle of Least Astonishment)**。然而，最近一...</description></item><item><title>string 与 rune 的设计哲学：为什么Go 程序员很少为“乱码”烦恼？</title><link>https://tonybai.com/2025/10/13/string-and-rune-in-go/</link><pubDate>Mon, 13 Oct 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/10/13/string-and-rune-in-go/</guid><description>本文永久链接 – https://tonybai.com/2025/10/13/string-and-rune-in-go 大家好，我是Tony Bai。 &amp;gt; “为什么我的字符又乱码了？！” 这是一个在软件开发历史上，曾让无数程序员彻夜难眠的哀嚎。处理文本，是编程中最基础的任务之一，但其背后关于编码 (Encoding) 和字符集 (Character Set) 的水，远比看起来要深。正如 Joe...</description></item><item><title>揭秘Go语言中的rune：一段跨越30年的Plan 9往事与UTF-8的诞生传奇</title><link>https://tonybai.com/2025/05/16/how-rune-came/</link><pubDate>Fri, 16 May 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/05/16/how-rune-came/</guid><description>揭秘Go语言中的rune：一段跨越30年的Plan 9往事与UTF-8的诞生传奇 - Tony Bai =============== Tony Bai 一个程序员的心路历程 * Google Go语言编码风格规范 * Google Go语言编码风格规范：指南篇 * Google Go语言编码风格规范：决定篇 * Google Go语言编码风格规范：最佳实践篇 * Go语言第一课FAQ * Go语...</description></item><item><title>使用reflect包在反射世界里读写各类型变量</title><link>https://tonybai.com/2021/04/19/variable-operation-using-reflection-in-go/</link><pubDate>Mon, 19 Apr 2021 00:00:00 +0800</pubDate><guid>https://tonybai.com/2021/04/19/variable-operation-using-reflection-in-go/</guid><description>本文永久链接 – https://tonybai.com/2021/mm/dd/variable-operation-using-reflection-in-go Go在标准库中提供的reflect包让Go程序具备运行时的反射能力(reflection)，但这种反射能力也是一把“双刃剑”，它在解决一类特定问题方面具有优势，但也带来了逻辑不清晰、性能问题以及难于发现问题和调试等不足。不过从Go诞生伊...</description></item><item><title>Go语言的“黑暗角落”：盘点学习Go语言时遇到的那些陷阱[译]（第二部分）</title><link>https://tonybai.com/2021/03/29/darker-corners-of-go-part2/</link><pubDate>Mon, 29 Mar 2021 00:00:00 +0800</pubDate><guid>https://tonybai.com/2021/03/29/darker-corners-of-go-part2/</guid><description>本文翻译自Rytis Bieliunas的文章《Darker Corners of Go》。 第一部分参见[《Go语言的“黑暗角落”：盘点学习Go语言时遇到的那些陷阱\[译\]（第一部分）》](https://tonybai.com/2021/03/29/darker-corners-of-go-part1) 7\. 字符串和字节数组 ------------ 1) Go中的字符串 Go字符串的内...</description></item><item><title>Go语言的“黑暗角落”：盘点学习Go语言时遇到的那些陷阱[译]（第一部分）</title><link>https://tonybai.com/2021/03/29/darker-corners-of-go-part1/</link><pubDate>Mon, 29 Mar 2021 00:00:00 +0800</pubDate><guid>https://tonybai.com/2021/03/29/darker-corners-of-go-part1/</guid><description>本文翻译自Rytis Bieliunas的文章《Darker Corners of Go》。 &amp;gt; 译注：若干年前，Kyle Quest曾发过一篇名为“50 Shades of Go: Traps, Gotchas, and Common Mistakes for New Golang Devs”的文章，仿效著名的《C Traps and Pitfalls》编写了50条Go语言的陷阱与缺陷，一时在G...</description></item><item><title>图解中文字符编码-Go语言例解</title><link>https://tonybai.com/2019/11/07/non-ascii-character-encoding-illustrated/</link><pubDate>Thu, 07 Nov 2019 00:00:00 +0800</pubDate><guid>https://tonybai.com/2019/11/07/non-ascii-character-encoding-illustrated/</guid><description>今天几个同事在处理一个有关中文字符编码的问题，感觉他们对字符编码这件事依然理解不够透彻。这里用图文方式对中文字符编码做一个简要的解释，例子使用Go语言。 我们知道每个英文字母和数字在计算机中都会对应一个字节，或者说用一个字节来表示，这就是最初的ASCII码。但是随着计算机在全球范围内的广泛使用，非英语国家也要在计算机使用自己的字符，于是出现了字符集“百花齐放”的情况，我国在早期也颁布了自己的中文字...</description></item></channel></rss>