<?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>Godoc on Tony Bai</title><link>https://tonybai.com/tags/godoc/</link><description>Recent content in Godoc on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Fri, 26 Dec 2025 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/godoc/index.xml" rel="self" type="application/rss+xml"/><item><title>像 Go 创始人一样思考：用五大思维原理重学 Go 语言</title><link>https://tonybai.com/2025/12/26/think-like-go-founders-relearn-go-five-principles/</link><pubDate>Fri, 26 Dec 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/12/26/think-like-go-founders-relearn-go-five-principles/</guid><description>本文永久链接 – https://tonybai.com/2025/12/26/think-like-go-founders-relearn-go-five-principles 大家好，我是Tony Bai。 学习一门新的编程语言时，我们常常陷入“是什么”的迷雾：goroutine 是什么？channel 是什么？interface 是什么？我们记忆语法，模仿示例，却很少追问那个更根本的问题——...</description></item><item><title>Go 的 16 年：一门为持久而生的编程语言</title><link>https://tonybai.com/2025/11/12/16-years-of-go-a-programming-language-built-to-last/</link><pubDate>Wed, 12 Nov 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/11/12/16-years-of-go-a-programming-language-built-to-last/</guid><description>本文永久链接 – https://tonybai.com/2025/11/12/16-years-of-go-a-programming-language-built-to-last 大家好，我是Tony Bai。 每年的十一月，对于全球的 Gopher 而言，都是一个值得纪念的特殊时刻。今年，我们迎来了 Go 语言公开发布的第 16 个年头。 在众多的庆祝文章中，来自 Go 社区的知名组织 Ar...</description></item><item><title>Go 1.25中值得关注的几个变化</title><link>https://tonybai.com/2025/08/15/some-changes-in-go-1-25/</link><pubDate>Fri, 15 Aug 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/08/15/some-changes-in-go-1-25/</guid><description>本文永久链接 – https://tonybai.com/2025/08/15/some-changes-in-go-1-25 大家好，我是Tony Bai。 北京时间2025年8月13日，Go 团队如期发布了 Go 语言的最新大版本——Go 1.25。按照惯例，每次 Go 大版本发布时，我都会撰写一篇“Go 1.x 中值得关注的几个变化”的文章。自 2014 年的 Go 1.4 版本起，这一系列...</description></item><item><title>Go 1.25新特性前瞻：GC提速，容器更“懂”Go，json有v2了！</title><link>https://tonybai.com/2025/06/14/go-1-25-foresight/</link><pubDate>Sat, 14 Jun 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/06/14/go-1-25-foresight/</guid><description>Go 1.25新特性前瞻：GC提速，容器更“懂”Go，json有v2了！ - Tony Bai =============== Tony Bai 一个程序员的心路历程 * Google Go语言编码风格规范 * Google Go语言编码风格规范：指南篇 * Google Go语言编码风格规范：决定篇 * Google Go语言编码风格规范：最佳实践篇 * Go语言第一课FAQ * Go语言进阶课...</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><item><title>重拾精髓：go doc -http让离线包文档浏览更便捷</title><link>https://tonybai.com/2024/09/06/go-doc-add-http-support/</link><pubDate>Fri, 06 Sep 2024 00:00:00 +0800</pubDate><guid>https://tonybai.com/2024/09/06/go-doc-add-http-support/</guid><description>重拾精髓：go doc -http让离线包文档浏览更便捷 | Tony Bai =============== Tony Bai一个程序员的心路历程 * Google Go语言编码风格规范 * Google Go语言编码风格规范：指南篇 * Google Go语言编码风格规范：决定篇 * Google Go语言编码风格规范：最佳实践篇 * Go语言第一课FAQ * 关于我 * 文章列表 重拾精髓：...</description></item><item><title>Go项目目录该怎么组织？官方终于出指南了！</title><link>https://tonybai.com/2023/10/05/the-official-guide-of-organizing-go-project/</link><pubDate>Thu, 05 Oct 2023 00:00:00 +0800</pubDate><guid>https://tonybai.com/2023/10/05/the-official-guide-of-organizing-go-project/</guid><description>本文永久链接 – https://tonybai.com/2023/10/05/the-official-guide-of-organizing-go-project 长久以来，在Go语言进阶的学习和实践之路上，Go项目目录究竟如何布局一直是困扰大家的一个问题，这是因为Go官方针对这个问题迟迟没有给出说法，更没有提供标准供大家参考。仅有Go语言项目技术负责人Russ Cox在一个开源项目的issu...</description></item><item><title>聊聊godoc、go doc与pkgsite</title><link>https://tonybai.com/2023/03/20/godoc-vs-go-doc-vs-pkgsite/</link><pubDate>Mon, 20 Mar 2023 00:00:00 +0800</pubDate><guid>https://tonybai.com/2023/03/20/godoc-vs-go-doc-vs-pkgsite/</guid><description>本文永久链接 – https://tonybai.com/2023/03/20/godoc-vs-go-doc-vs-pkgsite 就像上一篇文章聊到的Go内置单元测试框架一样，既重视语言特性，又不忘对Go软件项目提供整体环境特性的Go在诞生伊始就定义了如何在源码中通过注释编写代码文档的格式，并提供了基于代码注释实时生成Go文档并支持文档查看的工具。 而一些早期的语言，比如C、C++等则需要使用...</description></item><item><title>Go 1.19中值得关注的几个变化</title><link>https://tonybai.com/2022/08/22/some-changes-in-go-1-19/</link><pubDate>Mon, 22 Aug 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/08/22/some-changes-in-go-1-19/</guid><description>本文永久链接 – https://tonybai.com/2022/08/22/some-changes-in-go-1-19 我们知道Go团队在2015年重新规定了团队发布版本的节奏，将Go大版本的发布频率确定为每年两次，发布窗口定为每年的2月与8月。而实现自举的Go 1.5版本是这一个节奏下发布的第一个版本。一般来说，Go团队都会在这两个窗口的中间位置发布版本，不过这几年也有意外，比如承载着泛...</description></item><item><title>len(s)表达式的求值结果究竟是常量还是变量？我来告诉你</title><link>https://tonybai.com/2022/03/24/the-result-of-a-len-expression-is-constant-or-variable/</link><pubDate>Thu, 24 Mar 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/03/24/the-result-of-a-len-expression-is-constant-or-variable/</guid><description>本文永久链接 – https://tonybai.com/2022/03/24/the-result-of-a-len-expression-is-constant-or-variable **len**是Go预定义标识符，同时也是Go内置的预定义函数，通过go doc工具我们能查到len函数的doc如下： ``` $go doc builtin.len package builtin // im...</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 1.16中值得关注的几个变化</title><link>https://tonybai.com/2021/02/25/some-changes-in-go-1-16/</link><pubDate>Thu, 25 Feb 2021 00:00:00 +0800</pubDate><guid>https://tonybai.com/2021/02/25/some-changes-in-go-1-16/</guid><description>辛丑牛年初七开工大吉的日子(2021.2.18)，Go核心开发团队为中国Gopher们献上了大礼 – Go 1.16版本正式发布了！国内Gopher可以在Go中国官网上下载到Go 1.16在各个平台的安装包： 2020年双12，Go 1.16进入freeze状态，即不再接受新feature，仅fix bug、编写文档和接受安全更新等，那时我曾写过一篇名为《Go 1.16新功能特性不完全前瞻》的文章...</description></item><item><title>如何查看历史版本的Go文档？嘘！答案我只告诉你！</title><link>https://tonybai.com/2020/12/15/how-to-see-the-manual-of-go-history-version/</link><pubDate>Tue, 15 Dec 2020 00:00:00 +0800</pubDate><guid>https://tonybai.com/2020/12/15/how-to-see-the-manual-of-go-history-version/</guid><description>Go语言自开源至今已经11个年头了！截至本文发稿时，目前最新的Go版本为1.15，Go核心开发团队正紧锣密鼓的进行着Go 1.16版本的开发（现阶段主要是修复bug），该版本将在2021年2月份正式发布。 Go以“自带电池(battery included)”而为人所知，除了Go标准库的全面和强大之外，Go工具链的丰富和易用在主流编程语言中也是位列“执牛耳者”之列的，而Go文档查看工具就在Go工具...</description></item><item><title>Go 1.13中值得关注的几个变化</title><link>https://tonybai.com/2019/10/27/some-changes-in-go-1-13/</link><pubDate>Sun, 27 Oct 2019 00:00:00 +0800</pubDate><guid>https://tonybai.com/2019/10/27/some-changes-in-go-1-13/</guid><description>2019年对于Go语言来说也是一个重要的年份，因为在2019年的11月10日，Go即将迎来其开源10周年的纪念日。在这个重要日子的前夕，在GopherCon 2019大会后，Go项目组在2019.9.4日发布了Go 1.13版本。 这是自2017年GopherCon大会上Russ Cox做“Toward Go 2″主题演讲以来Go项目发布的第四个版本（前三个分别是：go 1.10、go 1.11和...</description></item><item><title>Go 1.12中值得关注的几个变化</title><link>https://tonybai.com/2019/03/02/some-changes-in-go-1-12/</link><pubDate>Sat, 02 Mar 2019 00:00:00 +0800</pubDate><guid>https://tonybai.com/2019/03/02/some-changes-in-go-1-12/</guid><description>Go team如期在2月末发布了Go 1.12版本。从Go 1.12的Release Notes粗略来看，这个版本相较于之前增加了go modules机制、WebAssembly支持的Go 1.11，变化略“小”。这也给下一个Go 1.13版本预留了足够的“惊喜”空间:)。从目前的plan来看，Go 1.13很可能落地的包括：Go2的几个proposals：Go 2 number literals...</description></item><item><title>Go 1.9中值得关注的几个变化</title><link>https://tonybai.com/2017/07/14/some-changes-in-go-1-9/</link><pubDate>Fri, 14 Jul 2017 00:00:00 +0800</pubDate><guid>https://tonybai.com/2017/07/14/some-changes-in-go-1-9/</guid><description>Go语言在2016年当选tiobe index的年度编程语言。 转眼间6个月过去了，Go在tiobe index排行榜上继续强势攀升，在最新公布的TIBOE INDEX 7月份的排行榜上，Go挺进Top10： 还有不到一个月，Go 1.9版本也要正式Release了（计划8月份发布），当前Go 1.9的最新版本是go1.9beta2，本篇的实验环境也是基于该版本的，估计与final go 1.9版...</description></item><item><title>理解Golang语句中的求值顺序</title><link>https://tonybai.com/2015/08/27/understanding-go-statements-evaluating-order/</link><pubDate>Thu, 27 Aug 2015 00:00:00 +0800</pubDate><guid>https://tonybai.com/2015/08/27/understanding-go-statements-evaluating-order/</guid><description>Golang在变量声明、初始化以及赋值语句上照比C语言有了许多改进： **a) 支持在同一行声明多个变量** var a, b, c int **b) 支持在同一行初始化多个变量（不同类型也可以）** var a, b, c = 5, &amp;#34;hello&amp;#34;, 3.45 a, b, c := 5, &amp;#34;hello&amp;#34;, 3.45 (short variable declaration) **c) 支持在同一行...</description></item><item><title>制作go-talks.appspot.com应用镜像</title><link>https://tonybai.com/2015/07/27/make-a-mirror-of-gotalks-appsport-app/</link><pubDate>Mon, 27 Jul 2015 00:00:00 +0800</pubDate><guid>https://tonybai.com/2015/07/27/make-a-mirror-of-gotalks-appsport-app/</guid><description>Go语言号称面向工程：对工程目录组织、代码风格（gofmt）、文档（生成）都制定的相应的“**标准**”，并提供了相应的工具帮助开发者满足这些工程specs。 gofmt用于格式化代码，形成统一代码风格。 godoc.org用于查看标准库或repo的doc。 go-talks.appspot.com则是用来查看go slide。 像godoc和go-talks这种以服务形式提供文档查看的形式不得不...</description></item><item><title>也谈Go语言编程 – Hello，Go!</title><link>https://tonybai.com/2012/08/17/hello-go/</link><pubDate>Fri, 17 Aug 2012 00:00:00 +0800</pubDate><guid>https://tonybai.com/2012/08/17/hello-go/</guid><description>_**Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system ena...</description></item></channel></rss>