<?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>Test on Tony Bai</title><link>https://tonybai.com/tags/test/</link><description>Recent content in Test on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Fri, 04 Jul 2025 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/test/index.xml" rel="self" type="application/rss+xml"/><item><title>Twitch工程师的Go进阶之路：为何你写的Go代码，总感觉“不对劲”？</title><link>https://tonybai.com/2025/07/04/everything-i-did-to-become-an-expert-in-golang/</link><pubDate>Fri, 04 Jul 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/07/04/everything-i-did-to-become-an-expert-in-golang/</guid><description>本文永久链接 – https://tonybai.com/2025/07/04/everything-i-did-to-become-an-expert-in-golang 大家好，我是Tony Bai。 你是否也有过这样的时刻？ 你已经用 Go 写了不少代码，项目也能跑起来，但内心深处总有一种挥之不去的“别扭感”。你写的 Go 代码，看起来更像是“带有 Go 语法的 Java/Python”，充...</description></item><item><title>拯救你的Commit Log：Conventional Commits实践指南</title><link>https://tonybai.com/2025/04/24/conventional-commits-guide/</link><pubDate>Thu, 24 Apr 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/04/24/conventional-commits-guide/</guid><description>拯救你的Commit Log：Conventional Commits实践指南 - Tony Bai =============== Tony Bai 一个程序员的心路历程 * Google Go语言编码风格规范 * Google Go语言编码风格规范：指南篇 * Google Go语言编码风格规范：决定篇 * Google Go语言编码风格规范：最佳实践篇 * Go语言第一课FAQ * Go语言...</description></item><item><title>代码提交者的代码评审通关指南[译]</title><link>https://tonybai.com/2024/10/11/the-cl-author-guide-to-getting-through-code-review/</link><pubDate>Fri, 11 Oct 2024 00:00:00 +0800</pubDate><guid>https://tonybai.com/2024/10/11/the-cl-author-guide-to-getting-through-code-review/</guid><description>本文永久链接 – https://tonybai.com/2024/10/11/the-cl-author-guide-to-getting-through-code-review Google在软件工程领域对IT界做出了卓越的贡献，从《Google软件工程》，到Google Style Guides，再到The Change Author’s Guide。这些实践参考不仅提升了软件工程的标准，也...</description></item><item><title>Go 1.21新特性前瞻</title><link>https://tonybai.com/2023/04/26/go-1-21-foresight/</link><pubDate>Wed, 26 Apr 2023 00:00:00 +0800</pubDate><guid>https://tonybai.com/2023/04/26/go-1-21-foresight/</guid><description>本文永久链接 – https://tonybai.com/2023/04/26/go-1-21-foresight Go 1.21版本正在如火如荼地开发当中，按照Go核心团队的一年两次的发布节奏来算，Go 1.21版本预计将在2023年8月发布(Go 1.20版本是在2023年2月份发布的)。 本文将和大家一起看看Go 1.21都会带来哪些新特性。不过由于目前为时尚早，下面列出的有些变化最终不一定...</description></item><item><title>一文告诉你当module path为main时执行go test失败的真正原因</title><link>https://tonybai.com/2023/04/08/the-reason-why-go-test-fails-when-module-path-is-main/</link><pubDate>Sat, 08 Apr 2023 00:00:00 +0800</pubDate><guid>https://tonybai.com/2023/04/08/the-reason-why-go-test-fails-when-module-path-is-main/</guid><description>本文永久链接 – https://tonybai.com/2023/04/08/the-reason-why-go-test-fails-when-module-path-is-main 近期收到新加入“Gopher部落”知识星球的星友“凌风”的一个问题，内容如下： 在一个目录下，我编写了a.go和a_test.go，在go mod init main后执行go test，会报错：could no...</description></item><item><title>将Roaring Bitmap序列化为JSON</title><link>https://tonybai.com/2023/02/01/serialize-roaring-bitmap-to-json/</link><pubDate>Wed, 01 Feb 2023 00:00:00 +0800</pubDate><guid>https://tonybai.com/2023/02/01/serialize-roaring-bitmap-to-json/</guid><description>本文永久链接 – https://tonybai.com/2023/02/01/serialize-roaring-bitmap-to-json 近期在实现一个数据结构时使用到了位图索引(bitmap index)，本文就来粗浅聊聊位图(bitmap)。 一. 什么是bitmap 位图索引使用位数组(bit array，也有叫bitset的，通常被称为位图(bitmap)，以下均使用bitmap这...</description></item><item><title>聊聊Go与TLS 1.3</title><link>https://tonybai.com/2023/01/13/go-and-tls13/</link><pubDate>Fri, 13 Jan 2023 00:00:00 +0800</pubDate><guid>https://tonybai.com/2023/01/13/go-and-tls13/</guid><description>本文永久链接 – https://tonybai.com/2023/01/13/go-and-tls13 除了一些综述类文章和译文，我的文章选题多来源于实际工作和学习中遇到的问题。这次我们来聊聊近期遇到一个问题：**如何加快基于TLS安全通信的海量连接的建连速度**? TLS(Transport Layer Security)传输安全层的下面是TCP层，我们首先可能会想到的是**优化内核有关TCP...</description></item><item><title>让reviewdog支持gitlab-push-commit，守住代码质量下限</title><link>https://tonybai.com/2022/09/08/make-reviewdog-support-gitlab-push-commit-to-preserve-the-code-quality-floor/</link><pubDate>Thu, 08 Sep 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/09/08/make-reviewdog-support-gitlab-push-commit-to-preserve-the-code-quality-floor/</guid><description>本文永久链接 – https://tonybai.com/2022/09/08/make-reviewdog-support-gitlab-push-commit-to-preserve-the-code-quality-floor 一. 代码质量保证的手段 从世界上首款计算机高级程序设计语言Fortran自上世纪50年代诞生以来，编程这个行当已经走过了近70年。虽然年头已不少，但不可否认的一点是...</description></item><item><title>手把手教你使用ANTLR和Go实现一门DSL语言（第五部分）：错误处理</title><link>https://tonybai.com/2022/05/30/an-example-of-implement-dsl-using-antlr-and-go-part5/</link><pubDate>Mon, 30 May 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/05/30/an-example-of-implement-dsl-using-antlr-and-go-part5/</guid><description>本文永久链接 – https://tonybai.com/2022/05/30/an-example-of-implement-dsl-using-antlr-and-go-part5 无论是端应用还是云应用，要上生产环境，有一件事必须要做好，那就是**错误处理**。在本系列前面的文章中，我们设计了文法与语法、建立并验证了语义模型，但我们没有特别关注错误处理。在这一篇中，我们就来补上这个环节。 D...</description></item><item><title>手把手教你使用ANTLR和Go实现一门DSL语言（第四部分）：组装语义模型并测试DSL</title><link>https://tonybai.com/2022/05/28/an-example-of-implement-dsl-using-antlr-and-go-part4/</link><pubDate>Sat, 28 May 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/05/28/an-example-of-implement-dsl-using-antlr-and-go-part4/</guid><description>本文永久链接 – https://tonybai.com/2022/05/28/an-example-of-implement-dsl-using-antlr-and-go-part4 在上一篇文章中，我们为DSL建立了完整的语义模型，我们距离DSL的语法示例真正run起来还差最后一步，那就是基于语法树提取信息(逆波兰式)、组装语义模型，在加载语义模型并实例化各个规则处理器(processor)后...</description></item><item><title>手把手教你使用ANTLR和Go实现一门DSL语言（第三部分）：建立和验证语义模型</title><link>https://tonybai.com/2022/05/27/an-example-of-implement-dsl-using-antlr-and-go-part3/</link><pubDate>Fri, 27 May 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/05/27/an-example-of-implement-dsl-using-antlr-and-go-part3/</guid><description>本文永久链接 – https://tonybai.com/2022/05/27/an-example-of-implement-dsl-using-antlr-and-go-part3 在前面的系列文章中，我们为气象学家们设计了一门名为**Tdat**的DSL，使用ANTLR的文法规则编写了Tdat的文法，基于该文法生成了Tdat的语法解析器代码并初步验证了文法的正确性，Tdat可以成功将我们编写...</description></item><item><title>Go社区主流Kafka客户端简要对比</title><link>https://tonybai.com/2022/03/28/the-comparison-of-the-go-community-leading-kakfa-clients/</link><pubDate>Mon, 28 Mar 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/03/28/the-comparison-of-the-go-community-leading-kakfa-clients/</guid><description>本文永久链接 – https://tonybai.com/2022/03/28/the-comparison-of-the-go-community-leading-kakfa-clients 一. 背景 众所周知，Kafka是Apache开源基金会下的明星级开源项目，作为一个开源的分布式事件流平台，它被成千上万的公司用于高性能数据管道、流分析、数据集成和关键任务应用。在国内，无论大厂小厂，无论是...</description></item><item><title>通过实例理解Go Execution Tracer</title><link>https://tonybai.com/2021/06/28/understand-go-execution-tracer-by-example/</link><pubDate>Mon, 28 Jun 2021 00:00:00 +0800</pubDate><guid>https://tonybai.com/2021/06/28/understand-go-execution-tracer-by-example/</guid><description>本文永久链接 – https://tonybai.com/2021/06/28/understand-go-execution-tracer-by-example Netflix（奈飞公司）的性能架构师Brendan Gregg在其《BPF Performance Tools》一书中对tracing、sampling等概念做了细致描述，以帮助开发人员理解这些概念，并基于这些概念对性能优化辅助工具进...</description></item><item><title>Go语言“十诫”[译]</title><link>https://tonybai.com/2021/04/09/ten-commandments-of-go/</link><pubDate>Fri, 09 Apr 2021 00:00:00 +0800</pubDate><guid>https://tonybai.com/2021/04/09/ten-commandments-of-go/</guid><description>本文永久链接 – https://tonybai.com/2021/04/09/ten-commandments-of-go 本文翻译自John Arundel的《Ten commandments of Go》。全文如下： 作为一名全职的Go语言作家和老师，我花了很多时间和学生们一起，帮助他们写出更清晰、更好、更有用的Go程序。我发现，我给他们的建议可以归纳总结为一套通用原则，在这里我将这些原则分...</description></item><item><title>对Go 1.16 io/fs设计的第一感觉：得劲儿！</title><link>https://tonybai.com/2021/03/23/io-fs-interface-is-an-excellent-design/</link><pubDate>Tue, 23 Mar 2021 00:00:00 +0800</pubDate><guid>https://tonybai.com/2021/03/23/io-fs-interface-is-an-excellent-design/</guid><description>1\. 设计io/fs的背景 Go语言的接口是Gopher最喜欢的语法元素之一，其隐式的契约满足和“当前唯一可用的泛型机制”的特质让其成为面向组合编程的强大武器，其存在为Go建立事物抽象奠定了基础，同时也是建立抽象的主要手段。 Go语言从诞生至今，最成功的接口定义之一就是io.Writer和io.Reader接口： type Writer interface { Write(p []byte) (...</description></item><item><title>官宣：Go专栏“改善Go语言编程质量的50个有效实践”上线了</title><link>https://tonybai.com/2020/09/08/imooc-go-column-is-available/</link><pubDate>Tue, 08 Sep 2020 00:00:00 +0800</pubDate><guid>https://tonybai.com/2020/09/08/imooc-go-column-is-available/</guid><description>断断续续写了一年多的Go专栏：《改善Go语言编程质量的50个有效实践》今天终于正式上线了！- https://www.imooc.com/read/87 慕课专栏：《改善Go语言编程质量的50个有效实践》 Go语言是Google大牛团队(Robert Griesemer、Rob Pike以及Ken Thompson)设计的一种静态类型、编译型编程语言，支持垃圾回收和轻量级并发，它于2009年11月...</description></item><item><title>开始'亡羊补牢'</title><link>https://tonybai.com/2006/04/12/begin-fix-before-lost-too-much/</link><pubDate>Wed, 12 Apr 2006 00:00:00 +0800</pubDate><guid>https://tonybai.com/2006/04/12/begin-fix-before-lost-too-much/</guid><description>就在昨天，就在我们的项目要结项的时候，一个影响力不亚于’广岛原子弹’的bug出炉了，蒙蔽我近一个月的问题终于被澄清了，不过为时已晚，项目即将上线，如果想彻底地解决这个问题，需要对整个系统的实现架构作调整，目前能做的只是’亡羊补牢’了。 这里先简单的说一下问题的原因吧！熟悉Unix编程的人都知道有’共享内存映射’这回事儿，我们的问题恰巧就出在对’共享内存映射’的使用不当上。由于我们使用的底层库采用的...</description></item></channel></rss>