<?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>MethodSet on Tony Bai</title><link>https://tonybai.com/tags/methodset/</link><description>Recent content in MethodSet on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Mon, 24 Mar 2025 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/methodset/index.xml" rel="self" type="application/rss+xml"/><item><title>Go方法名的作用域：包级，但需间接调用</title><link>https://tonybai.com/2025/03/24/understand-methodname-scope/</link><pubDate>Mon, 24 Mar 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/03/24/understand-methodname-scope/</guid><description>Go方法名的作用域：包级，但需间接调用 - Tony Bai =============== Tony Bai 一个程序员的心路历程 * Google Go语言编码风格规范 * Google Go语言编码风格规范：指南篇 * Google Go语言编码风格规范：决定篇 * Google Go语言编码风格规范：最佳实践篇 * Go语言第一课FAQ * Go语言进阶课FAQ * 关于我 * 文章列表 ...</description></item><item><title>绞尽脑汁，帮你理解方法本质并选择正确的receiver类型</title><link>https://tonybai.com/2022/05/17/understand-the-nature-of-go-method-and-how-to-choose-the-correct-receiver-type/</link><pubDate>Tue, 17 May 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/05/17/understand-the-nature-of-go-method-and-how-to-choose-the-correct-receiver-type/</guid><description>本文永久链接 – https://tonybai.com/2022/05/17/understand-the-nature-of-go-method-and-how-to-choose-the-correct-receiver-type Go语言虽然不支持经典的面向对象语法元素，比如：类、对象、继承等，但Go语言也有方法（method）。和函数相比，Go语言中的方法在声明形式上仅仅多了一个参数，G...</description></item><item><title>为什么这个T类型实例无法调用*T类型的方法</title><link>https://tonybai.com/2022/02/27/go-addressable/</link><pubDate>Sun, 27 Feb 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/02/27/go-addressable/</guid><description>本文永久链接 – https://tonybai.com/2022/02/27/go-addressable 近期在“Go语言第一课”专栏后台看到一位学员的一则留言，如下图： 由于有课程上下文，所以我这里将问题的上下文重新描述一下。 在专栏的第25讲，我们学习了Go语言提供的一个“语法糖”，比如下面这个例子： ``` type T struct { a int } func (t T) M1() ...</description></item><item><title>关于Go，你可能不注意的7件事</title><link>https://tonybai.com/2015/09/17/7-things-you-may-not-pay-attation-to-in-go/</link><pubDate>Thu, 17 Sep 2015 00:00:00 +0800</pubDate><guid>https://tonybai.com/2015/09/17/7-things-you-may-not-pay-attation-to-in-go/</guid><description>Go以简洁著称，但简洁中不乏值得玩味的小细节。这些小细节不如goroutine、interface和channel那样&amp;#34;高大上&amp;#34;，&amp;#34;屌 丝&amp;#34;得可能不经常被人注意到，但它们却对理解Go语言有着重要的作用。这里想挑出一些和大家一起通过详实的例子来逐一展开和理解。本文内容较为基础，适合初学者，高手可飘过:) **一、源文件字符集****和字符集编码** Go源码文件默认采用Unicode字符集，Unic...</description></item></channel></rss>