<?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>坑 on Tony Bai</title><link>https://tonybai.com/tags/%E5%9D%91/</link><description>Recent content in 坑 on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Thu, 07 Jul 2022 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/%E5%9D%91/index.xml" rel="self" type="application/rss+xml"/><item><title>GoCN社区Go读书会第二期：《Go语言精进之路》</title><link>https://tonybai.com/2022/07/07/gocn-community-go-book-club-issue2-go-programming-from-beginner-to-master/</link><pubDate>Thu, 07 Jul 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/07/07/gocn-community-go-book-club-issue2-go-programming-from-beginner-to-master/</guid><description>本文永久链接 – https://tonybai.com/2022/07/07/gocn-community-go-book-club-issue2-go-programming-from-beginner-to-master 本文是2022年6月26日我在**GoCN社区的Go读书会第二期《Go语言精进之路》直播的文字稿**。本文对直播的内容做了重新整理与修订，供喜欢阅读文字的朋友们在收看直播后...</description></item><item><title>Go语言错误处理</title><link>https://tonybai.com/2015/10/30/error-handling-in-go/</link><pubDate>Fri, 30 Oct 2015 00:00:00 +0800</pubDate><guid>https://tonybai.com/2015/10/30/error-handling-in-go/</guid><description>近期闲暇用Go写一个lib，其中涉及到error处理的地方让我琢磨了许久。关于Go错误处理的资料和视频已有许多，Go authors们也在官方Articles和Blog上多次提到过一些Go error handling方面的一些tips和best practice，这里仅仅算是做个收集和小结，尽视野所及，如有不足，欢迎评论中补充。（10月因各种原因，没有耕博，月末来一发，希望未为晚矣 ^\_^） ...</description></item><item><title>近期遇到的3个Golang代码问题</title><link>https://tonybai.com/2015/01/23/three-issues-about-go-code/</link><pubDate>Fri, 23 Jan 2015 00:00:00 +0800</pubDate><guid>https://tonybai.com/2015/01/23/three-issues-about-go-code/</guid><description>这两周来业余时间都在用Golang写代码，现在处于这样一个状态：除了脚本，就是Golang了。反正能用golang实现的，都用golang写。 Golang语言相对成熟了，但真正写起来，还是要注意一些“坑”的，下面是这周遇到的三个问题，这里分享出来，希望能对遇到同样问题的童鞋有所帮助。 **一、误用定时器，狂占CPU** golang中有一个通过channel实现timeout或tick time...</description></item><item><title>一个有关Golang变量作用域的坑</title><link>https://tonybai.com/2015/01/13/a-hole-about-variable-scope-in-golang/</link><pubDate>Tue, 13 Jan 2015 00:00:00 +0800</pubDate><guid>https://tonybai.com/2015/01/13/a-hole-about-variable-scope-in-golang/</guid><description>临近下班前编写和调试一段Golang代码，但运行结果始终与期望不符，怪异的很，下班前依旧无果。代码Demo如下： //testpointer.go package main import (         &amp;#34;fmt&amp;#34; ) var p \*int func foo() (\*int, error) {         var i int = 5         return &amp;amp;i, nil } f...</description></item></channel></rss>