<?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>Wrapped-Error on Tony Bai</title><link>https://tonybai.com/tags/wrapped-error/</link><description>Recent content in Wrapped-Error on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Sun, 14 Apr 2024 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/wrapped-error/index.xml" rel="self" type="application/rss+xml"/><item><title>要么返回错误值，要么输出日志，别两样都做</title><link>https://tonybai.com/2024/04/14/either-return-error-or-log-them-do-not-do-both/</link><pubDate>Sun, 14 Apr 2024 00:00:00 +0800</pubDate><guid>https://tonybai.com/2024/04/14/either-return-error-or-log-them-do-not-do-both/</guid><description>本文永久链接 – https://tonybai.com/2024/04/14/either-return-error-or-log-them-do-not-do-both 1\. 缘起 ------ 这周，一个产品团队内进行Go代码评审时，得到了一个结论：所有的if err != nil的地方都应该输出错误日志。然而，这种做法并不是最佳实践，它存在一些问题。 首先，打印过多的错误日志会导致日志文...</description></item></channel></rss>