<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Go on 조정환</title><link>https://junghwan16.github.io/categories/go/</link><description>Recent content in Go on 조정환</description><generator>Hugo</generator><language>ko</language><lastBuildDate>Tue, 14 Apr 2026 10:00:00 +0900</lastBuildDate><atom:link href="https://junghwan16.github.io/categories/go/index.xml" rel="self" type="application/rss+xml"/><item><title>Go 에러 처리 — 백엔드 개발자가 알아야 할 것들</title><link>https://junghwan16.github.io/backend/go/2026/04/14/go-error-handling/</link><pubDate>Tue, 14 Apr 2026 10:00:00 +0900</pubDate><guid>https://junghwan16.github.io/backend/go/2026/04/14/go-error-handling/</guid><description>&lt;p&gt;새벽 3시에 알람이 울렸다. 슬랙에는 &amp;ldquo;결제 실패&amp;rdquo; 알림이 쏟아지고, 로그를 열었더니 이렇게 쓰여 있다.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;ERROR: something went wrong
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;이게 어느 함수에서 나온 건지, 원인이 DB인지 네트워크인지, 재시도하면 되는지 아니면 데이터 자체가 문제인지 — 아무것도 알 수 없다.&lt;/p&gt;
&lt;p&gt;Go의 에러 처리는 쉬워 보인다. &lt;code&gt;if err != nil { return err }&lt;/code&gt;. 하지만 이게 전부라고 생각하면 프로덕션에서 반드시 이 상황을 만나게 된다.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="에러의-두-가지-역할"&gt;에러의 두 가지 역할&lt;/h2&gt;
&lt;p&gt;Go 에러는 동시에 두 종류의 독자를 위해 존재한다.&lt;/p&gt;</description></item></channel></rss>