<?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>Break on Tony Bai</title><link>https://tonybai.com/tags/break/</link><description>Recent content in Break on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Wed, 29 Oct 2025 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/break/index.xml" rel="self" type="application/rss+xml"/><item><title>解构Go函数迭代器——为什么 break 没有按预期工作？</title><link>https://tonybai.com/2025/10/29/why-break-in-go-function-iterators-does-not-work/</link><pubDate>Wed, 29 Oct 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/10/29/why-break-in-go-function-iterators-does-not-work/</guid><description>本文永久链接 – https://tonybai.com/2025/10/29/why-break-in-go-function-iterators-does-not-work 大家好，我是Tony Bai。 在我的极客时间专栏《Tony Bai·Go语言进阶课》的关于 Go 1.23+ 函数迭代器的第9讲中，我介绍了一种非常强大的高级用法——**迭代器组合 (Iterator Compositi...</description></item><item><title>Go 1.23中的自定义迭代器与iter包</title><link>https://tonybai.com/2024/06/24/range-over-func-and-package-iter-in-go-1-23/</link><pubDate>Mon, 24 Jun 2024 00:00:00 +0800</pubDate><guid>https://tonybai.com/2024/06/24/range-over-func-and-package-iter-in-go-1-23/</guid><description>本文永久链接 – https://tonybai.com/2024/06/24/range-over-func-and-package-iter-in-go-1-23 在《Go 1.23新特性前瞻》一文中，我们提到了Go 1.23中增加的一个主要的语法特性就是**支持了用户自定义iterator**，即range over func试验特性的正式转正。为此，Go 1.23还在标准库中增加了iter...</description></item><item><title>聊聊Go语言的控制语句</title><link>https://tonybai.com/2023/05/27/control-flow-statement-in-go/</link><pubDate>Sat, 27 May 2023 00:00:00 +0800</pubDate><guid>https://tonybai.com/2023/05/27/control-flow-statement-in-go/</guid><description>本文永久链接 – https://tonybai.com/2023/05/27/control-flow-statement-in-go 在高级编程语言中，控制流语句(control-flow statement)是一类用于控制程序执行流程的语句，以下简称为**控制语句**。它们可以根据条件或循环执行相应的代码块，或者跳转到指定位置执行代码。 常见的控制语句包括： * 条件语句：根据条件执行不同的...</description></item><item><title>Go程序员拥抱C语言简明指南</title><link>https://tonybai.com/2022/05/16/the-short-guide-of-embracing-c-lang-for-gopher/</link><pubDate>Mon, 16 May 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/05/16/the-short-guide-of-embracing-c-lang-for-gopher/</guid><description>本文永久链接 – https://tonybai.com/2022/05/16/the-short-guide-of-embracing-c-lang-for-gopher 本文是为于航老师的极客时间专栏《深入C语言和程序运行原理》写的加餐文章《Tony Bai：Go程序员拥抱C语言简明指南》，这里分享给大家，尤其是那些想学习C语言的Gopher们。 * * * 你好，我是Tony Bai。 也许...</description></item><item><title>Go语言中常见的几种反模式[译]</title><link>https://tonybai.com/2021/03/31/common-anti-patterns-in-go/</link><pubDate>Wed, 31 Mar 2021 00:00:00 +0800</pubDate><guid>https://tonybai.com/2021/03/31/common-anti-patterns-in-go/</guid><description>本文翻译自Saif Sadiq的文章《Common anti-patterns in Go》。 众所周知，编码是一门艺术，就像每个拥有精湛艺术并为之感到骄傲的工匠一样，我们作为开发人员也为我们编写的代码感到自豪。为了获得最佳效果，艺术家不断寻找可提高其手艺的方法和工具。同样，作为开发人员，我们也在不断提高自己的技能，并对”如何写出好的代码”这个最重要的问题的答案保持好奇。 弗雷德里克·布鲁克斯（F...</description></item></channel></rss>